E - Choosing Candies
CodeChefOpen on judge ↗
The Guardian Deity of the third room, Utkarsh is an avid foodie. As soon as Chef enters the room Utkarsh challenges him to a eat-beat. Chef is presented with an infinite supply of two types of candies: gold crèmes and silver eclairs. Utkarsh sets a rule: Chef can eat either **1** gold crème or **3** silver eclairs in one mouthful. Now you are given $n$, the number of candies Chef has eaten.
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