Problem Setting at C-BAY
CodeChefOpen on judge ↗
Ayush loved XORs and Shiv loved Prime Numbers. So, they decided together to frame a question for C-BAY. The question finally framed was very simple. You are given a number N, find the next bigger prime number M whose XOR with the given number will be greater than or equal to N. Unfortunately they could not solve it themselves. They finally proposed it to their Senior Anurag. He saw the problem
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.
Sign in to chat with the tutor and save your progress.
Sign in to start