Chef Bakes Cake 2
Chef is an expert baker. To make a cake, he needs $N$ different ingredients numbered $1, 2, \ldots, N$. He needs $A_i$ amount of the ingredient numbered $i$, and he currently has $B_i$ amount of that ingredient already. Each ingredient costs him $1$ coin to buy. Find the total cost of buying the excess ingredients necessary to make $1$ cake. ### Input - The first line of input will contain a sin
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