AmazonOA #145
Transform to Encrypted Number
估计简单可在线判题
考点(AI 标注)模拟/实现位运算
In each round, add every two adjacent numbers and keep only the ones digit, so the array length decreases by 1. Repeat until exactly two digits remain, and output them in order as a two-character string, keeping a leading 0.
输入格式
The first line contains n (2..5000), and the second line contains n digits in 0..9.
输出格式
Output exactly two digit characters; a leading 0 must be kept.
样例 1
输入:
4
4 5 6 7
输出:
04
样例 2
输入:
4
1 2 3 4
输出:
82
样例 3
输入:
2
0 0
输出:
00
样例说明
Example 1: 4567→913→04, so output 04 rather than 4. Example 2: 1234→357→82. Example 3: the original two digits are 00, so no operation is needed; output 00.