結果

問題 No.442 和と積
ユーザー Tsubasa
提出日時 2018-02-07 09:26:10
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 1,000 ms
コード長 181 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-04 23:10:45
合計ジャッジ時間 1,523 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

def gcd(a, b):
    if a % b == 0:
        return b
    else:
        return gcd(b, a % b)

def main():
    A, B = [int(_) for _ in input().split()]
    print(gcd(A+B, A*B))

main()
0