310304: CF1812C. Digits

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

C. Digitstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputInput

The first line contains a single integer $t$ ($1 \le t \le 32$) — the number of test cases.

Each test case contains $n$ lines. The $i$-th line contains an integer $a_i$ ($1 \le a_i \le 9$).

The sum of $n$ over all test cases doesn't exceed $155$.

Output

For each test case, print one integer — the answer.

ExampleInput
3
2
1
4
7
1
2
3
5
Output
8
7
30

Input

题意翻译

## 题目描述 无 ## 输入格式 输入的第一行为一个整数 $ t $ ( $ 1 \le t \le 32 $ ),表示数据组数。 接下来每组数据 $n$ 行,第 $i$ 行为一个整数 $ a_i $ ( $ 1 \le a_i \le 9 $ ). 所有组的 n 之和不超过 $155$。 ## 输出格式 对每组数据,输出一个整数表示答案。 ## 样例 #1 ### 样例输入 #1 ``` 3 2 1 4 7 1 2 3 5 ``` ### 样例输出 #1 ``` 8 7 30 ```

加入题单

算法标签: