← All problemsSign in

Chef and Lottery Numbers

Chef recently bought an online catering website. To increase his sales he decides to organize a lottery system, where you get one digit for every item you buy. A person's lottery number is formed by taking all the digits they received, in the order in which they were received. For example, if a person buys items A, B and C in that order, and gets digits 1, 5, and 7 respectively for these items, 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