mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
36 lines
612 B
Python
36 lines
612 B
Python
def problem_p02256(input_data):
|
||
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_B&lang=jp
|
||
|
||
# ??????????????????????????????
|
||
|
||
# ?????§??¬?´???°???????????????????????????????????¨????????¨?¨????????????????
|
||
|
||
def gcd(x, y):
|
||
|
||
tmp = y
|
||
|
||
if y > x:
|
||
|
||
y = x
|
||
|
||
x = tmp
|
||
|
||
while not y == 0:
|
||
|
||
y = x % y
|
||
|
||
x = tmp
|
||
|
||
tmp = y
|
||
|
||
return x
|
||
|
||
def main():
|
||
|
||
target = [int(a) for a in input_data.split()]
|
||
|
||
return gcd(target[0], target[1])
|
||
|
||
if __name__ == "__main__":
|
||
|
||
main()
|