結果

問題 No.442 和と積
ユーザー okayunonaha
提出日時 2016-11-11 23:40:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 231 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-25 09:43:25
合計ジャッジ時間 1,622 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

def gcd(x, y):
  if x < y:
    tmp = x
    x = y
    y = tmp
  while True:
    if y == 0:
      break
    x = x % y
    tmp = x
    x = y
    y = tmp

  return x

a,b = map(int, input().split())

c = gcd(a+b, a*b)
print(c)
okayu@ok
0