POJ 2636
1 #include<iostream> 2 #include<stdio.h> 3 using namespace std; 4 5 int main() 6 { 7 //freopen("acm.acm","r",stdin); 8 int num; 9 int sum; 10 int time; 11 int a; 12 cin>>time; 13 while(time --) 14 { 15 sum = 0; 16 cin>>num; 17 sum -= num - 1; 18 while(num --) 19 { 20 cin>>a; 21 sum += a; 22 } 23 cout<<sum<<endl; 24 } 25 }