Glitch · Medium CodeFree
Forgot Where It Ends
A music box played a tune, and someone recorded every note. Its wheel repeats the same notes over and over, but the recording may stop half-way through a turn. What is the smallest wheel that could play it?
Write the shortest wheel that plays exactly the recording.
The wheel must play every note and be as short as possible.
N, the number of recorded notes.N notes from A to G with no spaces.N ≤ 500 00010 CDECDECDEC
CDE
Sign in to play. It is free.
Sign in