Problem Name : Head or Tail
Solution :
এই প্রবলেম নাকি ACM/ICPC South America/Brazil Regional Contest 2004, Warm-Up

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author : shohan | |
// URI OJ | |
// Problem Name : Head or Tail | |
/// Problem No: 1329 | |
//Level : Easy | |
#include<stdio.h> | |
int main() | |
{ | |
int t,score[10000],i,j,marry,john; | |
while(scanf("%d",&t)==1){ | |
marry=0; | |
john=0; | |
if(t==0) | |
break; | |
for(i=0;i<t;i++){ | |
scanf("%d",&score[i]); | |
} | |
for(j=0;j<t;j++){ | |
if(score[j]==0) | |
marry++; | |
else | |
john++; | |
} | |
printf("Mary won %d times and John won %d times\n",marry,john); | |
} | |
return 0; | |
} |