結果

問題 No.442 和と積
ユーザー fiord
提出日時 2017-03-01 20:35:47
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 141 bytes
コンパイル時間 579 ms
コンパイル使用メモリ 7,068 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-04 23:03:30
合計ジャッジ時間 1,069 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

def gcd(a,b):
	if b==0:
		return a
	else:
		return gcd(b,a%b)
a,b=map(long,raw_input().split())
x=max(a+b,a*b)
y=min(a+b,a*b)
print gcd(x,y)
0