Problems > Candy Rounds > Editorial

Candy Rounds — Solution & Editorial

Back to the Problem

One full circle costs N(N+1)/2 candies — skip whole circles with division, then simulate the final partial circle.

Complexity: O(N) after skipping full rounds