結果

問題 No.136 Yet Another GCD Problem
ユーザー togatoga
提出日時 2015-09-03 09:46:34
言語 Python2
(2.7.18)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 170 bytes
コンパイル時間 226 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 9,600 KB
最終ジャッジ日時 2024-07-18 21:53:01
合計ジャッジ時間 3,636 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #

import fractions
res = 0
N,K = map(int, raw_input().split())
for i in range(1, N / 2 + 1):
    T = N - i
    G = i
    res = max(res, fractions.gcd(T, G))
print res
    
0