Tasty Decisions
Chef is buying sweet things to prepare for Halloween! The shop sells both chocolate and candy. - Each bar of chocolate has a tastiness of $X$. - Each piece of candy has a tastiness of $Y$. One packet of chocolate contains $2$ bars, while one packet of candy contains $5$ pieces. Chef can only buy one packet of something sweet, and so has to make a decision: which one should he buy in order to **
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