Bakery Problem
For today, Chef is out of town, and his evil son has taken over his bakery. Normally, Chef sells his cakes for $100$ rupees each. However, his son can be bribed with $K$ rupees, to sell each cake for $60$ rupees instead. Note that you have to pay this bribe only one time, not for each cake. You want to buy $N$ cakes from the bakery. You can choose whether to bribe Chef's son or not. What is the
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