/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 200 点
問題文
高橋君はボウリングで N 回ボールを投げました。 i 回目の投球では A_i 本のピンを倒しました。
高橋君はスコアシートに、各投球の結果を次の記号で記録します。
- 10 本倒したなら
X - 1 本も倒せなかったなら
- - それ以外なら倒した本数を表す数字(
1から9)
N 回の投球の記録を、 1 回目から順に並べた長さ N の文字列として出力してください。
制約
- 1 \leq N \leq 100
- 0 \leq A_i \leq 10
- 入力はすべて整数
入力
入力は以下の形式で標準入力から与えられる。
N A_1 A_2 \ldots A_N
- 1 行目には、投球の回数 N が与えられる。
- 2 行目には、各投球で倒したピンの本数 A_1, A_2, \ldots, A_N がスペース区切りで与えられる。
出力
記録を表す長さ N の文字列を 1 行で出力せよ。
入力例 1
5 7 10 3 9 10
出力例 1
7X39X
入力例 2
1 5
出力例 2
5
入力例 3
4 1 2 3 4
出力例 3
1234
入力例 4
15 1 3 4 3 9 6 6 2 1 1 3 4 8 10 9
出力例 4
1343966211348X9
入力例 5
1 4
出力例 5
4
Score : 200 pts
Problem Statement
Takahashi threw a bowling ball N times. On the i-th throw, he knocked down A_i pins.
Takahashi records the result of each throw on a score sheet using the following symbols:
Xif he knocked down 10 pins-if he knocked down no pins- Otherwise, the digit representing the number of pins knocked down (
1through9)
Output a string of length N consisting of the records of the N throws arranged in order from the first throw.
Constraints
- 1 \leq N \leq 100
- 0 \leq A_i \leq 10
- All input values are integers.
Input
The input is given from standard input in the following format:
N A_1 A_2 \ldots A_N
- The first line contains the number of throws N.
- The second line contains the numbers of pins knocked down A_1, A_2, \ldots, A_N, separated by spaces.
Output
Print a single line containing the string of length N representing the records.
Sample Input 1
5 7 10 3 9 10
Sample Output 1
7X39X
Sample Input 2
1 5
Sample Output 2
5
Sample Input 3
4 1 2 3 4
Sample Output 3
1234
Sample Input 4
15 1 3 4 3 9 6 6 2 1 1 3 4 8 10 9
Sample Output 4
1343966211348X9
Sample Input 5
1 4
Sample Output 5
4