Problem Brief
Find the Damaged Toy
OA
At a birthday party, N kids (IDs from 1 to N) sit in a circle. The host has T toys to distribute, starting from kid with ID D and giving one toy at a time in ascending order. After reaching kid N, the count continues from kid 1.
Input
Three integers:
N: Number of kidsT: Number of toysD: Starting kid's ID
Output
Print the ID of the kid who receives the damaged (last) toy.
1Example 1
Input
N = 5, T = 2, D = 1
Output
2
Explanation
:)