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 comment is hidden because it contains spoiler information about the solution
A good coder is forced to be a minimum good at maths.
This comment is hidden because it contains spoiler information about the solution
Sorry but five minutes with pen and paper are sufficient to see what happens... There is no trick! Moreover there is no "waste of time" when you make your brain work:-)
Yes I agree, I actually hate these sorts of katas where there's some sort of discovery required i.e. you happen to figure out what the trick is. If you don't, you can spend days wasting your time.
It's not a coding kata, it's a "Find the magical trick" kata.
It is sufficient to calculate 1 / n by hand to see what happens.