Skip to content

Commit cb9f36d

Browse files
committed
CODECHEF COOK82 Solution
Solution of Problem 👍 COOK82A
1 parent 9eafa9d commit cb9f36d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

CODECHEF/CODECHEF_COOK82A.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//CodeChef Problem : La Liga (COOK82)
2+
//Problem Code : COOK82A
3+
//Author : Piyush
4+
#include<stdio.h>
5+
int main()
6+
{
7+
char str[20];
8+
int i,t,b,m,r,e,no;
9+
scanf("%d",&t);
10+
while(t--)
11+
{
12+
for(i=1;i<=4;i++)
13+
{
14+
scanf("%s%d",str,&no);
15+
if(str[0]=='B')
16+
b=no;
17+
else if(str[0]=='M')
18+
m=no;
19+
else if(str[0]=='R')
20+
r=no;
21+
else
22+
e=no;
23+
}
24+
if(r<m && b>e)
25+
printf("Barcelona\n");
26+
else
27+
printf("RealMadrid\n");
28+
}
29+
return 0;
30+
}

0 commit comments

Comments
 (0)