← All problemsSign in

Math Wizard Mahesh

Mahesh claims that he is very good with numbers and is especially good at calculating prime factors. One day his friends challenged him to a game. They would each write down one number on a chit and give it to Mahesh. Mahesh is supposed to find the sum(S) of the numbers of the chits and then find the smallest number X such that X>=sum and X contains 2 as its only prime factor. Unfortunately

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