結果

問題 No.136 Yet Another GCD Problem
コンテスト
ユーザー togatoga
提出日時 2015-09-03 09:46:34
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 156 ms / 5,000 ms
コード長 170 bytes
記録
コンパイル時間 139 ms
コンパイル使用メモリ 77,716 KB
最終ジャッジ日時 2025-12-03 16:34:40
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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