結果
| 問題 |
No.3296 81-like number
|
| コンテスト | |
| ユーザー |
sepa38
|
| 提出日時 | 2025-09-06 15:18:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 53 ms / 2,000 ms |
| コード長 | 263 bytes |
| コンパイル時間 | 353 ms |
| コンパイル使用メモリ | 82,324 KB |
| 実行使用メモリ | 64,180 KB |
| 最終ジャッジ日時 | 2025-09-06 15:18:15 |
| 合計ジャッジ時間 | 2,312 ms |
|
ジャッジサーバーID (参考情報) |
judge / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
l = 10 ** 5
isp = [1] * l
for i in range(2, l):
if not isp[i]:
continue
for j in range(i*i, l, i):
isp[j] = 0
n = int(input())
ans = 0
for p in range(2, l):
if not isp[p]:
continue
x = p ** 2
while x <= n:
ans += x
x *= p
print(ans)
sepa38