← All problemsSign in

Playlist

CodeChefRating 489Open on judge ↗

Chef's playlist contains $3$ songs named $A, B$, and $C$, each of duration exactly $X$ minutes. Chef generally plays these $3$ songs in loop, i.e, $A \rightarrow B \rightarrow C \rightarrow A \rightarrow B \rightarrow C \rightarrow A \rightarrow \dots$ Chef went on a train journey of $N$ minutes and played his playlist on loop for the whole journey. How many times did he listen to the song $C$ **

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