結果
問題 | No.2750 Number of Prime Factors |
ユーザー |
![]() |
提出日時 | 2024-05-10 23:22:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 521 bytes |
コンパイル時間 | 178 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-20 07:38:29 |
合計ジャッジ時間 | 1,656 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
ソースコード
import sysinput = sys.stdin.readlinex=1000import mathL=math.floor(math.sqrt(x)) # 平方根を求めるPrimelist=[i for i in range(x+1)]Primelist[1]=0 # 1は素数でないので0にする.for i in Primelist:if i>L:breakif i==0:continuefor j in range(2*i,x+1,i):Primelist[j]=0Primes=[Primelist[j] for j in range(x+1) if Primelist[j]!=0]A=[1]for p in Primes:A.append(A[-1]*p)N=int(input())for i in range(len(A)):if N>=A[i]:ANS=iprint(ANS)