Wrong Answer
Code
#include<stdio.h>
int main()
{
int t,odd=0,even=0;
scanf("%d",&t);
char result[t][10];
for(int i=0;i<t;i++)
{
int n;
scanf("%d",&n);
for (int j = 0; j < n; j++)
{
int x;
scanf("%d",&x);
if(x%2==0)
{
even++;
}
else
{
odd++;
}
}
if (odd > even)
{
sprintf(result[i],"Roy");
}
else
{
sprintf(result[i],"Hridoy");
}
}
for(int i=0;i<t;i++)
{
printf("%s\n",result[i]);
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1102 Odd-Even Game
- Contest
- Brain Booster #6
- Language
- C11 (GCC 13.2.0)
- Submit At
- 2024-10-03 17:17:27
- Judged At
- 2024-12-17 11:33:03
- Judged By
- Score
- 1
- Total Time
- 12ms
- Peak Memory
- 528.0 KiB