結果
問題 |
No.8023 素数判定するだけ
|
ユーザー |
![]() |
提出日時 | 2020-05-25 13:00:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 344 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-13 02:02:46 |
合計ジャッジ時間 | 4,587 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 25 |
ソースコード
n=int(input()) def factorize(n): fct=[] b,e=2,0 while b*b<=n: while n%b==0: n=n//b e=e+1 if e>0: fct.append((b,e)) b,e=b+1,0 if n>1: fct.append((n,1)) return fct l=factorize(n) if n==1: print("NO") elif len(l)<=1: print("YES") else: print("NO")