mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 5835.cpp
This commit is contained in:
parent
f0ee2f9bec
commit
9ad5bcff0c
22
HDOJ/5835.cpp
Normal file
22
HDOJ/5835.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <cstdio>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
int t;
|
||||
scanf("%d",&t);
|
||||
for(int test=1;test<=t;test++)
|
||||
{
|
||||
int n;
|
||||
scanf("%d",&n);
|
||||
long long ans=0;
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
int tmp;
|
||||
scanf("%d",&tmp);
|
||||
ans+=tmp;
|
||||
}
|
||||
ans/=2;
|
||||
printf("Case #%d: %lld\n",test,ans);
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user