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 is a bad solution and it will not work in case the max number is prime and greater then 1000. Because of inefficient code I had to reduce the number of prime numbers generated, but by removing the first if statement the code will work for any case, although it might be slow for big numbers.