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.
.
Your solution has a very, very serious performance problem. Testing a single value of
2_000_000_000
makes it time out. Yourfor
loop needs fixing, because the way it is now, it works terribly slowly.I would consider a solution which loops a billion times buggy, and not a kata issue.
Why is this a kata issue? Maybe your solution is too slow or falls into some infinite loop?