Typing Challenge
CodeChefOpen on judge ↗
Kalia decided to take on a typing challenge. Since he loves natural numbers, he decided to start typing every natural number (starting from 1 'natural'ly ;)). However, Kalia has limited energy: M units of energy to be precise. And the typewriter that he uses has a specialized weight on each digit. The weights are as follows: Typing the digit '0' takes 0 units of energy, '1' takes 1 unit of energy
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.
Sign in to chat with the tutor and save your progress.
Sign in to start