← All problemsSign in

Chef and Lottery

Chef went to the supermarket to shop ingredients for dinner. At the reception there was a lottery where you have to pick a ticket. If you pick a winning ticket you would get extra discount on your shopping amount. Chef played the lottery and got a ticket which had a number written on it. If the number is divisible by the sum of its digits then the ticket is a winning ticket. You have t

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