Ash and Pikachu
CodeChefOpen on judge ↗
Recently Ash became a pokemon trainer. His first pokemon was Pikachu. Now he is so obsessed with pikachu that he wants to increase its CP (Combat Power) using pikachu candies. He caught the pikachu with CP 'X' and can increase its CP to maximum 'Y'. Now Ash loves maths so he wants to increase pikachu's CP in such a way that after every increase we get CP value which has exactly 'K' unique prime f
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