結果
| 問題 | No.2750 Number of Prime Factors |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-10 21:37:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 281 bytes |
| 記録 | |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 82,028 KB |
| 実行使用メモリ | 840,880 KB |
| 最終ジャッジ日時 | 2024-12-20 04:41:36 |
| 合計ジャッジ時間 | 49,822 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 2 |
| other | TLE * 9 MLE * 10 |
ソースコード
n=int(input())
ans=0
tmp=1
prime = [True for i in range(10**8+1)]
p = 2
while (p * p <= n):
if (prime[p] == True):
tmp*=p
if tmp<=n:
ans+=1
else:
exit(print(ans))
for i in range(p * 2, 10**8+1, p):
prime[i] = False
p += 1
print(ans)