Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
string a;
cin>>a;
int M=0, R=0;
for(int i=0; i<a.length(); i++){
if(a[i]=='p'){
M++;
}
else{
R++;
}
}
if(M>R){
cout<<"Roy"<<endl;
}
else if(M==R){
cout<<"Draw"<<endl;
}
else{
cout<<"Mahfuz"<<endl;
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1040 Character game
- Contest
- TLE_Headquarters - round #1
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-03-27 16:33:01
- Judged At
- 2024-11-11 03:38:32
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 764.0 KiB