Friday, October 24, 2014

UVA-12279 ( Emoogle Balance) EASy

12279 - Emoogle Balance

 

00010002

#include<stdio.h>
int main()
{
int n,P,a,i,o;
P=1;
while(scanf("%d",&n)!=EOF)
{
if(n==0)
{
break;
}
int j=0,K=0;
for(i=0; i<n; i++)
{
scanf("%d",&a);
if(a==0)
{
j++;
}
else
{
K++;
}
}
printf("Case %d: %d\n",P,(K-j));
P++;
}
return 0;


}


12279 - Emoogle Balance UVA LINK

No comments:

Post a Comment