結果

問題 No.136 Yet Another GCD Problem
ユーザー rlangevinrlangevin
提出日時 2023-01-08 20:34:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 308 bytes
コンパイル時間 1,078 ms
コンパイル使用メモリ 86,620 KB
実行使用メモリ 71,380 KB
最終ジャッジ日時 2023-08-22 05:37:25
合計ジャッジ時間 6,438 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,148 KB
testcase_01 AC 73 ms
71,084 KB
testcase_02 AC 75 ms
71,028 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 75 ms
70,864 KB
testcase_09 AC 76 ms
70,912 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 73 ms
71,136 KB
testcase_24 WA -
testcase_25 AC 73 ms
71,140 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 71 ms
71,228 KB
testcase_32 WA -
testcase_33 AC 72 ms
71,168 KB
testcase_34 AC 73 ms
71,092 KB
testcase_35 AC 76 ms
71,108 KB
testcase_36 AC 72 ms
71,328 KB
testcase_37 AC 75 ms
71,140 KB
testcase_38 AC 75 ms
71,120 KB
testcase_39 AC 77 ms
71,144 KB
testcase_40 AC 74 ms
71,008 KB
testcase_41 AC 74 ms
70,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def div(n):
    if n <= 0:
        return []
    S = set()
    i = 1
    while i * i <= n:
        if n % i == 0:
            S.add(i)
            S.add(n // i)
        i += 1
    return list(S)

N, K = map(int, input().split())
ans = 1
for d in div(N):
    if d >= K:
        ans = max(ans, N//d)
print(ans)
0