Posted on 2008-03-13 21:33
superman 阅读(216)
评论(0) 编辑 收藏 引用 所属分类:
ZOJ
1 /* Accepted 2807 C++ 00:00.00 832K */
2 #include <iostream>
3
4 using namespace std;
5
6 int main()
7 {
8 int n, m, sum, t;
9 cin >> n;
10 while(n--)
11 {
12 sum = 0;
13 cin >> m;
14 for(int i = 0; i < m; i++)
15 {
16 cin >> t;
17 sum = sum + t;
18 }
19 cout << (sum - m + 1) << endl;
20 }
21
22 return 0;
23 }
24