5 XP challenge

Advance a Circular Counter

very easy
Build it yourself · 3 min
1 Learn2 Predict3 Solve

Task
Your mission

Advance start by steps positions in a cycle of length cycle and return the final position. cycle is 1 to 20; start is 0 to cycle-1; steps is 0 to 40.

Examples

InputReturn
start = 2, steps = 3, cycle = 5

position: 2 → 3 → 4 → 0. The result is 0.

0
start = 2, steps = 0, cycle = 52

Your code

Write your answer inside Solution, then use return to send it back.

Try examples runs the public examples. Check my code checks your full answer and saves your completion.