← All problemsSign in

Fruit Party

Today, Chef and his friends wants to eat fruits, particularly apples, oranges and watermelon. An apple increases their energy by one unit, an orange increases their energy by two unit and a watermelon by three units. They have to recharge their energy to exactly $n$ units such that they use minimum number of apples $A$ and then maximize total number of fruits eaten. Output $A$ and the total numbe

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