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
I am really not sure about this. Inputs go slightly above 1M, and determining whether a number of magniture 1M is prime is not that expensive, or difficult. Some optimization techniques are to be expected for a 5 kyu kata, but this kata requires only very basic ones, nothing really fancy.
how on earth is this an issue
I've seen hacky code before - this isn't hacky in the least. If anything, it's the most idiomatic way to do this, imo.