#abc241a. A - Digit Machine
A - Digit Machine
Score : points
问题陈述
存在一个带有屏幕的设备,屏幕上显示一个单个数字,并带有一个按钮。
当屏幕显示出数字 时,按下按钮一次会将屏幕上的数字更改为 。
当前设备显示的是数字 。在连续按压按钮三次后,屏幕上将会显示什么内容?
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
There is a device with a screen that shows a single-digit number, and a button.
When the screen is showing a number , pressing the button once changes the number on the screen to .
The device currently shows . After pressing the button times, what will be shown on the screen?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
9 0 1 2 3 4 5 6 7 8
Sample Output 1
7
The number on the screen transitions as .
Sample Input 2
4 8 8 8 0 8 8 8 8 8
Sample Output 2
4
The number on the screen transitions as .
Sample Input 3
0 0 0 0 0 0 0 0 0 0
Sample Output 3
0
update @ 2024/3/10 10:22:44