The Romance II
CodeChefOpen on judge ↗
Shiva in his quest to impress his "loosu ponnu" girlfriend Ramya, decides to get her a gift. Shiva visits a nearby gift shop and finds out that the shop is owned by his main rival P. In order to make things difficult, P demands Shiva that he can buy a gift from his shop, only if he can pay him an amount, which must be exactly a power of the number N(Note that the power can be zero). Shiva already
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