/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 14ms 3.066 MiB
#2 Wrong Answer 1379ms 3.152 MiB

Code

for _ in range(int(input())):

    n , m = map(int, input().split())
    if m > n:
        n, m = m, n
    flag = 0
    ans = 1
    for i in range(2,int(n**.5)+1):
        if n % i == 0:
            ans = i
            break
        else:
            flag = 1
            continue
    if flag == 1:
        print(1)
    else:
        print(ans)

    

Information

Submit By
Type
Submission
Problem
P1011 LCD
Contest
Brain booster - 1
Language
Python 3 (Python 3.12.3)
Submit At
2023-12-31 14:54:02
Judged At
2024-11-11 03:46:06
Judged By
Score
0
Total Time
1379ms
Peak Memory
3.152 MiB