{"problem":{"name":"Last Card","description":{"content":"We will hand out a total of $K$ cards to $N$ people numbered $1, 2, \\ldots, N$. Beginning with Person $A$, we will give the cards one by one to the people in this order: $A, A+1, A+2, \\ldots, N, 1, 2,","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc227_a"},"statements":[{"statement_type":"Markdown","content":"We will hand out a total of $K$ cards to $N$ people numbered $1, 2, \\ldots, N$.\nBeginning with Person $A$, we will give the cards one by one to the people in this order: $A, A+1, A+2, \\ldots, N, 1, 2, \\ldots$. Who will get the last card?\nFormally, after Person $x(1 \\leq x < N)$ gets a card, Person $x+1$ will get a card. After Person $N$ gets a card, Person $1$ gets a card.\n\n## Constraints\n\n*   $1 \\leq N,K \\leq 1000$\n*   $1 \\leq A \\leq N$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $K$ $A$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc227_a","tags":[],"sample_group":[["3 3 2","1\n\nThe cards are given to Person $2, 3, 1$ in this order."],["1 100 1","1"],["3 14 2","3"]],"created_at":"2026-03-03 11:01:14"}}