/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 15ms 3.07 MiB
#2 Accepted 15ms 3.02 MiB
#3 Time Exceeded ≥1093ms ≥3.09 MiB
#4 Accepted 210ms 3.129 MiB
#5 Time Exceeded ≥1097ms ≥2.934 MiB

Code

l="RGB"
t=int(input())
for i in range(t):
    k=int(input())
    if k==1:
        print("GRB")
    elif k == 2:
        print("GBR")
    elif k % 2 == 0:
        for z in range(k):
            l = l[1] + l[0] + l[2]
            l = l[::-1]
        print(l)
        l="RGB"
    elif k % 2 != 0:
        j = (2 * (int(k / 2)))
        for a in range(j):
            l = l[1] + l[0] + l[2]
            l = l[::-1]
        l = l[1] + l[0] + l[2]
        print(l)
        l="RGB"


















Information

Submit By
Type
Submission
Problem
P1010 Red Green Blue
Language
Python 3 (Python 3.12.3)
Submit At
2024-01-01 13:42:25
Judged At
2024-11-11 03:44:44
Judged By
Score
60
Total Time
≥1097ms
Peak Memory
≥3.129 MiB