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.
Frankly, I don't like this solution.
It is not readable, and logic is quite complex for no apparent reason.
Compare with my solution to see what I mean
Same as my solution, except for this calls to Math.max() functions, which can be dropped.
Compare with my solution.
This comment is hidden because it contains spoiler information about the solution
simply briliant!
The code as indeed short and clear. It's drawback is with the too many if statements it contains (if is an expensive action).
See this answer in stackoverflow: https://stackoverflow.com/questions/315306/is-if-expensive
the solution does not consider negative numbers and doesn't work with big numbers. For example: i = 541:
i % 5 is not 0, and i/10 is not 5, thus count will be increment by 1