Hulk and cake
CodeChefOpen on judge ↗
Hulk loves cupcakes, but he also likes to stay fit. Each cupcake has a calorie count, and Hulk can walk a distance to expend those calories. If Hulk has eaten j cupcakes so far, after eating a cupcake with c calories he must walk at least 2^j x c miles to maintain his weight. For example, if he eats 3 cupcakes with calorie counts in the following order: [5,10,7] , the miles he will need to walk a
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