結果

問題 No.2750 Number of Prime Factors
ユーザー pitPpitP
提出日時 2024-05-10 21:29:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 419 ms
コンパイル使用メモリ 82,492 KB
実行使用メモリ 53,876 KB
最終ジャッジ日時 2024-05-10 21:29:55
合計ジャッジ時間 1,776 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,332 KB
testcase_01 AC 45 ms
52,328 KB
testcase_02 AC 36 ms
52,732 KB
testcase_03 AC 34 ms
52,276 KB
testcase_04 AC 35 ms
52,456 KB
testcase_05 AC 36 ms
52,180 KB
testcase_06 AC 37 ms
53,432 KB
testcase_07 AC 40 ms
52,220 KB
testcase_08 AC 37 ms
52,704 KB
testcase_09 AC 36 ms
53,876 KB
testcase_10 AC 45 ms
53,812 KB
testcase_11 AC 37 ms
53,336 KB
testcase_12 AC 36 ms
53,248 KB
testcase_13 AC 36 ms
52,892 KB
testcase_14 AC 35 ms
53,016 KB
testcase_15 AC 36 ms
52,072 KB
testcase_16 AC 36 ms
53,252 KB
testcase_17 AC 36 ms
52,192 KB
testcase_18 AC 34 ms
53,016 KB
testcase_19 AC 35 ms
52,084 KB
testcase_20 AC 36 ms
53,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_right
p = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
acc = [1 << 61] * 100
acc[0] = 2
for i in range(1, len(p)):
    acc[i] = acc[i - 1] * p[i]
    if acc[i] > 10 ** 18:
        break
N = int(input())
print(bisect_right(acc, N))
0