Sweety and Printer
CodeChefOpen on judge ↗
Sweety has bought a new printer for writing a book. The printer prints in a unique way. It has alphabets arranged in a circular way and makes rotations to reach the desired alphabet. Since Sweety wants to print so many letters and the printer takes time in rotations, she wants to minimize the number of rotations for the printer. She needs to program the printer to take the shorter path for every
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