TopCoder

Cheng0928
NLOJ 管理員,題目若有誤請至 Discord 私訊我!

User's AC Ratio

66.7% (2/3)

Submission's AC Ratio

60.0% (3/5)

Tags

Description

這是一題數學題。

Input Format

第一行輸入一個數字 $t$ 代表有 $t$ 筆測試資料,
接下來對於每筆測試資料都會有若干行,每行皆有一個數字 $a_i$。
保證 $1 \le t \le 32$,且 $1 \le a_i \le 9$。

Output Format

輸出 $t$ 行,每行有一個數字代表答案。

Sample Input 1

3
2
1
4
7
1
2
3
5

Sample Output 1

8
7
30

Sample Input 2

3
2
2
2
2
2
2
2
2

Sample Output 2

8
2
16

Sample Input 3

4
1
2
3
4
5
6
7
8
9

Sample Output 3

6
4
1680
9

Hints

Problem Source

Subtasks

No. Testdata Range Constraints Score
1 0~2 無額外限制 100

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1
1 1000 65536 65536 1
2 1000 65536 65536 1