mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
2b2ae8c977
2300-2399
24 lines
393 B
C++
24 lines
393 B
C++
#include<iostream>
|
|
const int MAX=11;
|
|
int s[MAX];
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int n,m,i,sum;
|
|
while(cin>>n)
|
|
{
|
|
while(n--)
|
|
{
|
|
cin>>m;
|
|
sum=0;
|
|
for(i=0;i<m;i++)
|
|
{
|
|
cin>>s[i];
|
|
sum+=s[i];
|
|
}
|
|
cout<<sum-m+1<<endl;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|