#include<stdio.h>
int main()
{
int n,i,sum=0,h,d,k;
scanf("%d",&k);
for(d=0;d<k;d++){
scanf("%d",&n);
sum=0;
for(i=0;i<n;i++){
scanf("%d",&h);
if(h<0)
h=0;
sum=sum+h;
}
printf("Case %d: %d\n",d+1,sum);
}
}
No comments:
Post a Comment