結果

問題 No.192 合成数
ユーザー brthyyjpbrthyyjp
提出日時 2021-09-21 14:47:01
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 71,556 KB
最終ジャッジ日時 2023-09-17 00:28:27
合計ジャッジ時間 3,576 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,348 KB
testcase_01 AC 64 ms
71,224 KB
testcase_02 AC 62 ms
71,208 KB
testcase_03 AC 62 ms
71,388 KB
testcase_04 AC 66 ms
71,356 KB
testcase_05 AC 64 ms
71,556 KB
testcase_06 AC 62 ms
71,332 KB
testcase_07 AC 62 ms
71,328 KB
testcase_08 AC 62 ms
71,464 KB
testcase_09 AC 61 ms
71,348 KB
testcase_10 AC 63 ms
71,396 KB
testcase_11 AC 63 ms
71,324 KB
testcase_12 AC 60 ms
71,412 KB
testcase_13 AC 62 ms
71,324 KB
testcase_14 AC 61 ms
71,404 KB
testcase_15 AC 61 ms
71,456 KB
testcase_16 AC 62 ms
71,468 KB
testcase_17 AC 63 ms
71,396 KB
testcase_18 AC 67 ms
71,464 KB
testcase_19 AC 63 ms
71,552 KB
testcase_20 AC 69 ms
71,324 KB
testcase_21 AC 67 ms
71,332 KB
testcase_22 AC 65 ms
71,424 KB
testcase_23 AC 65 ms
71,324 KB
testcase_24 AC 66 ms
71,396 KB
testcase_25 AC 64 ms
71,464 KB
testcase_26 AC 66 ms
71,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
l = max(2, n-100)
r = n+100

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    return divisors

for i in range(l, r+1):
    d = make_divisors(i)
    if len(d) > 2:
        print(i)
        exit()
0