/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 13ms 2.797 MiB
#2 Accepted 12ms 2.711 MiB
#3 Accepted 12ms 2.793 MiB
#4 Accepted 12ms 2.816 MiB
#5 Accepted 11ms 2.73 MiB
#6 Accepted 11ms 2.875 MiB
#7 Accepted 13ms 2.891 MiB
#8 Accepted 15ms 2.73 MiB
#9 Accepted 17ms 2.797 MiB

Code

t = int(input())
for i in range(1,t+1):
    a , u = map(int, input().split())
    if u == 0:
        print(f"Game #{i}: 0 / 1")
    
    else:
        for j in range(u,0,-1):
            if u%j == 0 and a%j == 0:
                x = u//j
                y = a//j
                print(f"Game #{i}: {x} / {y}")
                break


        

Information

Submit By
Type
Submission
Problem
P1001 Achievement-Unlocked
Language
Python 3 (Python 3.12.3)
Submit At
2024-01-06 10:51:58
Judged At
2024-01-06 10:51:58
Judged By
Score
100
Total Time
17ms
Peak Memory
2.891 MiB