Wrong Answer
Code
#include <stdio.h>
int main() {
int t;
scanf("%d", &t);
while (t--)
{
char MD[101];
scanf("%s", MD);
int p,q ;
for (int i = 0; MD[i] != '\0'; i++) {
if (MD[i] == 'p') {
p++;
} else if (MD[i] == 'q') {
q++;
}
}
if (p > q) {
printf("Roy \n");
} else if (q > p) {
printf("Mahfuj \n");
} else {
printf("Draw\n");
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1040 Character game
- Contest
- TLE_Headquarters - round #1
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-03-27 16:39:54
- Judged At
- 2024-11-11 03:38:17
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 284.0 KiB