← All problemsSign in

Imperfectly Perfect

Baba Somdev likes some numbers and dislikes others.He likes those numbers x,such that sum of divisors of x(excluding x) is x itself.Let Sum(x) represent sum of divisors of x(excluding x) He says Inst(x) = |x-sum(x)| is the instability of a number x Given two numbers A,B ( A Input Input contains two space separated integers A,B both less than 10000000 Output The output must contain the require

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