atcoder#ABC241A. [ABC241A] Digit Machine
[ABC241A] Digit Machine
Score : points
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.
9 0 1 2 3 4 5 6 7 8
7
The number on the screen transitions as .
4 8 8 8 0 8 8 8 8 8
4
The number on the screen transitions as .
0 0 0 0 0 0 0 0 0 0
0