← 返回 amazon 的题目列表Digit Transformation Using Pascal's Triangle
类型:online_judge
Given an initial sequence of digits, apply a process of repeatedly summing adjacent pairs of numbers, keeping only the last digit of each sum. This reduces the sequence by one digit in each step until only two digits remain. These final two digits represent the output of the transformation. Output should be a string representing these two digits.
Example
Input
5
1 2 3 4 5