← All problemsSign in

Prime Plus

Problem description. Given a series of numbers, output Yes followed by the prime number's next number (not in the input series) if the number is a prime and only "No" (without quotes) if it is not a prime number. Input Input description. The input will be a series of numbers like P1 NP1 P2 P3 NP4 Output The output should be: Yes (Number following P1) No Yes (Number following P2) Yes (N

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