The Next Prime
Print the smallest prime strictly greater than N.
Input: one integer N.
Output: the next prime after N.
Constraints:
- 1 ≤ N ≤ 1012
Sample Tests
Input 1
10
Output 1
11
Input 2
1
Output 2
2
Discussion (opens after you solve — no spoilers before)
No comments yet.