← All problemsSign in

Next Prime

Next Prime Problem description. You will be given an Integer N as input and you have to print an integer M such that M is prime and M>N Input The input consists of a single integer N. Output The Output Consists of a single integer M Tips: Constraints - 1 ≤ N ≤ 1000000000 Example Input: 8 Output: 11 Explanation 11 is the immediate prime number after 8 ...

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start