← All problemsSign in

Buy Ten Packets

CodeChefRating 669Open on judge ↗

Chef wants to buy $10$ packets of an item. As it is festive season, Chef can buy - $2$ packets for a total of $X$ rupees - $4$ packets for a total of $Y$ rupees It is known that $X \lt Y \leq 2 \cdot X$. Determine the **minimum** cost Chef needs to pay to buy $10$ packets, if Chef can only buy packets of $2$ and $4$. ### Input - The first line of input will contain a single integer $T$, denot

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start