 [Community Puzzle] A story to go in circles

#22

Hi,

I don’t get why my code is working on the 3/4 cases either on tests or on validator.
Here’s what I undesrtood for “Test 4” :
There are 98765432123 steps like this (counting clockwise rotations)

a @ c d e f g h i
k l m n # p q r s
u v w x y z a b @
e f g h i j k # m
@ p q r s t u v w
y z a # c d e f g
i j k l m n @ p q
s t u v w x y z a
c d @ f g h i j k
step 0 / position 0 / letter a (1) / 0 rotations
step 1 / position 1 / letter @ / rotating counter-clockwise
step 1 / position 1 / letter s (19) / 3 rotations
step 2 / position 20 / letter a (1) / 3 rotations
step 3 / position 21 / letter k (11) / 3 rotations
step 4 / position 32 / letter d (4) / 3 rotations
step 5 / position 36 / letter e (5) / 3 rotations
step 6 / position 41 / letter c (3) / 3 rotations
step 7 / position 44 / letter g (7) / 3 rotations
step 8 / position 51 / letter l (12) / 3 rotations
step 9 / position 63 / letter @ / rotating counter-clockwise
step 9 / position 63 / letter s (19) / 2 rotations
step 10 / position 1 / letter j (10) / 2 rotations
! step 11 / position 11 / letter y (25) / 2 rotations
step 12 / position 36 / letter w (23) / 2 rotations
step 13 / position 59 / letter x (24) / 2 rotations
step 14 / position 2 / letter i (9) / 2 rotations
! step 15 / position 11 / letter y (25) / 2 rotations
step 16 / position 36 / letter w (23) / 2 rotations
step 17 / position 59 / letter x (24) / 2 rotations
step 18 / position 2 / letter i (9) / 2 rotations
! step 19 / position 11 / letter y (25) / 2 rotations
...

We can see that we don’t need to go every steps as there is a loop between step 11 and 15 which means that step 11, 15, 19, etc. are the same every 4th step.
At step 11, there are 98765432112 steps remaining.
98765432112 is divisible by 4 meaning the 98765432123th step (11 + 24691358028 * 4) is the same as 11.

However, the answer is “i” (the 14th step).

You can argue that depending on how you count steps the answer can vary, but this method worked on “Test 2” (123458 steps looping from 1 to 4) and “Test 3” (975312 steps looping from 8 to 15)

Can someone show me my mistake ?

#23

At step 11, there are 98765432112 steps remaining.

98765432111 because you start at step 0 (step 11 is the 12th).

#24

Thanks, I don’t understand why changing this operation didn’t break the other 2 but it worked.