Does Ash Loves Pikachu
CodeChefOpen on judge ↗
Ash and Pikachu loves each other so much but some of Pikachu's friends tried to make them apart. So Pikachu decided to take a test of Ash, to confirm if his love is real or not. Pikachu thinks of a hidden number from interval *[2, 400]* and your task is to find and tell Ash that if the hidden number is prime or composite so as to save their non-relationship . You can only ask upto 55 queries.
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