結果
問題 | No.36 素数が嫌い! |
ユーザー |
![]() |
提出日時 | 2021-11-28 02:30:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,592 ms / 5,000 ms |
コード長 | 350 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-30 17:25:17 |
合計ジャッジ時間 | 20,239 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
x=int(input()) # 素因数分解 import math L=int(math.sqrt(x)) FACT=dict() for i in range(2,L+2): while x%i==0: FACT[i]=FACT.get(i,0)+1 x=x//i if x!=1: FACT[x]=FACT.get(x,0)+1 if len(FACT)>=3 or (len(FACT)==2 and max(FACT.values())>=2) or len(FACT)==1 and max(FACT.values())>=3: print("YES") else: print("NO")