← All problemsSign in

Motu and Primes

Motu is a very intelligent student and is interested in research in Machine Learning domain. His college has only one professor, Mr. Scott working in that field. He approaches the professor for the same, but professor wants to test him first. To pass the test Motu must answer Q questions correctly. In all the Q questions, professor gives him three positive integers : A, B and K where A ≤ B. Now

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