[Python] 백준 18496 - Euclid's Algorithm

JongPark·2022년 5월 17일
0

Baekjoon

목록 보기
5/11
from math import gcd
d, k = map(int, input().split())
print(d * gcd(d ** 333, k) * ((d % 4 == 2 and k % 2 == 0 and k >= 4) + 1))

0개의 댓글