Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This solution would be better if it used a named constant instead of the abstract value.
This comment is hidden because it contains spoiler information about the solution
I think it's bad practice to modify a parameter within a function unless that's the purpose of the function.
I think modifying a parameter (n) within a function is bad practice as others working on the same code may rely on the original value elsewhere.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Am I missing something - is this maths problem not unsolvable without placing limits on K, as you can always just look for higher values of K to infinity that meet this equation.
Yes,m that's less typing, but it seems bad practice to me. As mentioned above, it's not the same as floor. And even if it works in this situation it makes the code harder to maintain and less reusable.