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.
If the problem required a more efficient solution then I would agree with Danil, but getting a brute force solution to this is not terribly difficult.
In the problem description it mentions that iterating up to n or n/2 will be too slow. If this is what you're doing, consider shortening the range on your loop (hint: the upper limit should be the largest factor of n, a value that involves fractional exponents).
This comment is hidden because it contains spoiler information about the solution