結果
| 問題 | No.2750 Number of Prime Factors |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-13 00:10:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 2,000 ms |
| コード長 | 331 bytes |
| コンパイル時間 | 295 ms |
| コンパイル使用メモリ | 82,476 KB |
| 実行使用メモリ | 59,696 KB |
| 最終ジャッジ日時 | 2024-12-20 09:17:06 |
| 合計ジャッジ時間 | 2,021 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 19 |
ソースコード
p=[True]*(1000)
p[0]=False; p[1]=False
i=2
while i<len(p):
if p[i]==False: i+=1; continue
j=2
while i*j<len(p):
p[i*j]=False
j+=1
i+=1
N=int(input())
# print(p)
ans=1
count=0
for i in range(len(p)):
if p[i] and ans*i<=N:
ans*=i
count+=1
elif not p[i]:
continue
else:
print(count)
exit()