mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 3947.cpp
This commit is contained in:
parent
577ecf0735
commit
5e52fc5135
23
ZOJ/3947.cpp
Normal file
23
ZOJ/3947.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int t;
|
||||
scanf("%d",&t);
|
||||
while(t--)
|
||||
{
|
||||
int n,tmp,sum;
|
||||
scanf("%d",&n);
|
||||
sum=n;
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
scanf("%d",&tmp);
|
||||
sum+=tmp;
|
||||
}
|
||||
printf("%d\n",sum);
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user