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.
I disagree this being a best practice. It is clever and looks simple. Sure. But it is also not maintainable. As soon as point boundaries change, you have to rewrite the whole logic.
This comment is hidden because it contains spoiler information about the solution
I love this use of the switch statement, have copied it to my references as a novel way of utilising it in problem solving. Thanks :)
Looks so elegant.
May qualify as best practice with a little comment on the top suggesting why you divided by 30 instead of 3...
but beautiful code regardless :D
Validations are important. Had no idea this simple problem could lead me to this piece of elegance ;w;
Beautiful solution. Almost poetic.