[NOIP 2013 提高组] 转圈游戏
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
个小伙伴(编号从 到 )围坐一圈玩游戏。按照顺时针方向给 个位置编号,从 到 。最初,第 号小伙伴在第 号位置,第 号小伙伴在第 号位置,……,依此类推。游戏规则如下:每一轮第 号位置上的小伙伴顺时针走到第 号位置,第 号位置小伙伴走到第 号位置,……,依此类推,第 号位置上的小伙伴走到第 号位置,第 号位置上的小伙伴走到第 号位置,……,第 号位置上的小伙伴顺时针走到第 号位置。
现在,一共进行了 轮,请问 号小伙伴最后走到了第几号位置。
输入格式
共一行,包含四个整数 ,每两个整数之间用一个空格隔开。
输出格式
一个整数,表示 轮后 号小伙伴所在的位置编号。
10 3 4 5
5
说明/提示
对于 的数据,;
对于 的数据,;
对于 的数据,,,,。
仲盛校区周六13点考前训练day25_10_8
- Status
- Done
- Rule
- OI
- Problem
- 7
- Start at
- 2025-10-8 11:30
- End at
- 2025-10-16 19:30
- Duration
- 200 hour(s)
- Host
- Partic.
- 7