Test Case for Question #2 in DWITE 2011-2012 High School Round 3
Contest: DWITE 2011-2012 High School Round 3
Question: #2
Input File: DATA2.txt
Output File: OUT2.txt
Input
2
9 9
5
3 1 4 1 5
6
2 7 1 8 2 8
8
1 7 1 1 7 1 1 1
8
10 10 10 10 10 10 10 10
Output
10
17
1177
74
11111111