#abc227a. A - Last Card
A - Last Card
Score : points
问题描述
我们将总共发放 张卡片给编号为 的 个人。
从第 号人开始,我们将按照以下顺序依次给人们分发卡片:。谁将得到最后一张卡片?
形式化地表述,当编号为 的人得到一张卡片后,编号为 的人会得到下一张卡片。在编号为 的人得到一张卡片后,编号为 的人会得到下一张卡片。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
We will hand out a total of cards to people numbered .
Beginning with Person , we will give the cards one by one to the people in this order: . Who will get the last card?
Formally, after Person gets a card, Person will get a card. After Person gets a card, Person gets a card.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print a number representing the person who will get the last card.
Sample Input 1
3 3 2
Sample Output 1
1
The cards are given to Person in this order.
Sample Input 2
1 100 1
Sample Output 2
1
Sample Input 3
3 14 2
Sample Output 3
3
update @ 2024/3/10 09:56:45