← All problemsSign in

Happy Birthday xoxo

Aditya is preparing a birthday cake for one of his girlfriends ;) , and he decided to write the age of the girlfriend in candles on the cake. There are 10 types of candles, one for each of the digits '0' through '9'. He has forgotten the age of his gf, however, so doesn't know whether he has enough candles of the right types. For example, if she was 101 years old, Aditya would need two '1' can

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