結果

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

ソースコード

diff #

def gcd(a,b):
    if a>b:
        m=a
        t=b
    else:
        m=b
        t=a
    r=m%t
    while r!=0:
        m=t
        t=r
        r=m%t
    return t
A,B=(int(i) for i in input (). split ())
S=A+B
P=A*B
print (gcd(S,P))
0