結果

問題 No.3296 81-like number
コンテスト
ユーザー 学ぶマン
提出日時 2025-11-29 18:55:48
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 418 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 397 ms
コンパイル使用メモリ 82,372 KB
実行使用メモリ 72,632 KB
最終ジャッジ日時 2025-11-29 18:55:53
合計ジャッジ時間 3,105 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

limit = 10**5
distinct_prime_factor_count = [0]*(limit+1)
primes = []
for i in range(2, limit+1):
    if distinct_prime_factor_count[i] == 0:
        primes.append(i)
        for num in range(i, limit+1, i):
            distinct_prime_factor_count[num] += 1

# 全探索する
ans = 0
for n in range(2, 34):
    for p in primes:
        if p**n > N:
            break
        else:
            ans += p**n

print(ans)
0