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.
well done xD
That's because you're using arrays, and some numbers in tests go up to trillions, so you run out of space for all elements. Try to think of another approach entirely.
Just imagine what you would do if this were asked in a maths exam... hope that helps.
You can also paste your code directly into the discourse usging three back ticks(`):
See here for more.
It's not about speeding up code per say; it's about finding an approach that works just as fast for small numbers as big ones.
Also have a read below.
There's no need for brute force, use your head and think how using arithmetic you can get one number from another.