mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
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;
|
||
|
}
|