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.
I think you're misreading something, maybe the error you get is
[2,4,3] should equal [2,4,6]
? In that case[2,4,3]
is what your function wrongly returned, not the input value.This comment is hidden because it contains spoiler information about the solution
Are you sure about that test? If the input is 2, the answer should be also 2 (see the post above)
Because 3 is a prime number, its the nearest prime to 3. The same for 11.
1 is not a prime number.