結果

問題 No.136 Yet Another GCD Problem
ユーザー roiti46roiti46
提出日時 2015-01-25 23:47:02
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 191 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 6,696 KB
実行使用メモリ 8,824 KB
最終ジャッジ日時 2023-09-05 06:43:03
合計ジャッジ時間 4,379 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 RE -
testcase_02 AC 11 ms
5,988 KB
testcase_03 AC 115 ms
6,868 KB
testcase_04 AC 160 ms
6,340 KB
testcase_05 RE -
testcase_06 AC 49 ms
6,440 KB
testcase_07 RE -
testcase_08 AC 59 ms
5,940 KB
testcase_09 RE -
testcase_10 AC 100 ms
6,660 KB
testcase_11 AC 134 ms
6,344 KB
testcase_12 RE -
testcase_13 AC 88 ms
6,832 KB
testcase_14 AC 219 ms
8,356 KB
testcase_15 AC 179 ms
7,248 KB
testcase_16 AC 153 ms
6,788 KB
testcase_17 AC 108 ms
6,052 KB
testcase_18 RE -
testcase_19 AC 151 ms
7,416 KB
testcase_20 AC 120 ms
7,236 KB
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 AC 11 ms
5,800 KB
testcase_27 AC 26 ms
5,880 KB
testcase_28 AC 19 ms
5,812 KB
testcase_29 AC 12 ms
6,088 KB
testcase_30 AC 11 ms
5,860 KB
testcase_31 AC 11 ms
5,800 KB
testcase_32 AC 11 ms
5,808 KB
testcase_33 AC 11 ms
5,856 KB
testcase_34 AC 70 ms
6,588 KB
testcase_35 RE -
testcase_36 RE -
testcase_37 AC 156 ms
6,564 KB
testcase_38 AC 12 ms
5,988 KB
testcase_39 AC 11 ms
5,800 KB
testcase_40 RE -
testcase_41 AC 11 ms
5,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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