Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 438 Bytes

File metadata and controls

12 lines (8 loc) · 438 Bytes

In this Kata, you will be given a number and your task will be to return the nearest prime number.

solve(4) = 3. The nearest primes are 3 and 5. If difference is equal, pick the lower one. 
solve(125) = 127

We'll be testing for numbers up to 1E10. 500 tests.

More examples in test cases.