AmazonOA #90
findNumber — Pascal Encryption
估计简单可在线判题
考点(AI 标注)模拟/实现位运算
Repeatedly build a new array from the sums of adjacent pairs modulo 10 until only two elements remain, then output them as a two-character string; leading 0s must not be dropped.
输入格式
The first line contains n (2..5000), and the second line contains n digits from 0..9.
输出格式
Output a string of exactly two digits, keeping leading 0s.
样例 1
输入:
4
4 5 6 7
输出:
04
样例 2
输入:
2
0 0
输出:
00
样例 3
输入:
3
9 9 9
输出:
88
样例说明
Example 1: 4 5 6 7→9 1 3→0 4, output 04. Example 2: already two digits, output 00 as is. Example 3: 9 9 9→8 8, output 88.