結果

問題 No.136 Yet Another GCD Problem
コンテスト
ユーザー roiti46
提出日時 2015-01-25 23:47:43
言語 PyPy2
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 214 bytes
記録
コンパイル時間 140 ms
コンパイル使用メモリ 77,560 KB
最終ジャッジ日時 2025-12-03 13:32:17
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N,K = map(int,raw_input().split())
ans = 1
for k in range(2,K+1):
    n = N
    cnt = 0
    if n < k: continue
    while n >= k:
        n -= k
        cnt += 1
    if n%cnt == 0: ans = max(ans, cnt)
print ans
    
0