| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:hi that is the solutionIn Reply To:Re:hi that is the solution Posted by:stephtan at 2008-08-09 23:57:06 #include <stdio.h>
int main()
{
int cases;
scanf("%d",&cases);
while(cases--)
{
int data,result,i,n;
scanf("%d",&n);
for(result=i=0;i<n;i++) {scanf("%d",&data); result+=data;}
printf("%d\n",result+1-n);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator