/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 12ms 2.68 MiB
#2 Accepted 12ms 2.883 MiB
#3 Accepted 11ms 2.883 MiB

Code

T = int(input())
for i in range(T):
    S = str(input())
    if S.count("p") > S.count("q"):
        print("Roy")
    elif S.count("q") > S.count("p"):
        print("Mahfuj")
    elif S.count("p") == S.count("q"):
        print("Draw")

Information

Submit By
Type
Submission
Problem
P1040 Character game
Language
Python 3 (Python 3.12.3)
Submit At
2024-03-27 21:40:16
Judged At
2024-03-27 21:40:16
Judged By
Score
100
Total Time
12ms
Peak Memory
2.883 MiB