[Community puzzle] Execution Circle

This topic is about the puzzle Execution Circle.

Feel free to send your feedback or ask some help here!

There should be more test-cases to make the trick easier to find.
I’m level 29, I can do it but as far as I did not solve the puzzle, I won’t do it.

I disagree test cases would change much. The “trick” (depending on which level you want to see it at) is already concealed by the input format. If someone wants to expose it, he’s already got to simplify that, and if he’s able to do that/think of doing that, he doesn’t really need the test cases.

FWIW, I solved it without the “full trick” (that I’m in a bad position to actually discuss since I only witnessed discussion about it, but didn’t actually read/view the full of it).

The rules are simple. In my opinion it’s easy to do different cases by hand to find the trick.

Hi! What is this “trick” everybody is writing in this thread? I think I solved the puzzle without the trick, I just wrote the formula down on the paper and converted it into the code.

Could someone provide some more test cases for this puzzle?
My equation is fast enough but cannot pass two of the validation tests. No clue to check what’s wrong.

My code works on all test cases but fails the three validators with D=“RIGHT”. Does someone know what’s wrong?

Now it works. My previous code was obviously wrong but it’s still irritating that it made all test cases pass…

I don’t think this is a “hard” puzzle at all, not from a developer’s standpoint. If you recognize the problem as a simpler variant of a classic recreational math problem (killing every 2nd person instead of every 3rd) then it’s easy to look up a canned solution. Even if not, it’s not too hard to find an O(log n) solution to the “start at 0, move clockwise” basic version and then rename the answer to reflect the given start and direction.

What I want to know is, “In what universe does ‘LEFT’ mean ‘clockwise’”? :roll_eyes:

In this one:

3 Likes

:grin: Good example!

Except, to a clock, that would be anticlockwise I suppose. :thinking:

Man, when people are facing towards the center of the circle, and each one is passing duties to the person on one’s LEFT, the motion is clockwise.