結果
| 問題 |
No.3296 81-like number
|
| コンテスト | |
| ユーザー |
くろ
|
| 提出日時 | 2025-10-05 14:56:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 434 bytes |
| コンパイル時間 | 193 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 14,720 KB |
| 最終ジャッジ日時 | 2025-10-05 14:57:20 |
| 合計ジャッジ時間 | 2,348 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 RE * 2 |
ソースコード
import math
n = int(input())
n_s = int(n**(1/2))
candidate = [i for i in range(2, n_s+1)]
primes = []
limit = math.sqrt(n_s) + 1
while True:
p = min(candidate)
if limit <= p:
primes.extend(candidate)
break
primes.append(p)
candidate = [i for i in candidate if i % p != 0]
s = 0
i = 63
for p in primes:
while p**i > n:
i -= 1
s += sum(list(p**j for j in range(2,i+1)))
print(s)
くろ