← All problemsSign in

Mohit and Milaap

Mohit loves to play with numbers. His friend Rahul wants to test his skills in number theory. Rahul gives Mohit a series of queries as explained below. In each query he gives three positive integers a, b, n, and ask Mohit to find the number of integers between a and b, inclusive, that are n-magic- numbers. He consider 1 to be 0-magic-number.According to him a number is called n-magic-number if the

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