結果

問題 No.136 Yet Another GCD Problem
ユーザー tookunn_1213
提出日時 2017-05-04 13:19:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 172 ms / 5,000 ms
コード長 147 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-09-14 07:04:34
合計ジャッジ時間 4,415 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #

def gcd(x,y):
	return gcd(y,x%y) if y != 0 else x
N,K = map(int,input().split())
ans = 0
for i in range(1,N):
	ans = max(ans,gcd(i,N-i))
print(ans)
0