結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2016-05-30 14:08:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 22,176 KB |
最終ジャッジ日時 | 2024-10-07 18:01:25 |
合計ジャッジ時間 | 7,570 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | AC * 11 TLE * 1 -- * 14 |
ソースコード
N=int(input()) f=False P=[] if N!=1 and N!=2: c=2 for j in range(2,int(N**0.5)): p=False k=0 u=j**0.5 for v in P: if v>u: break if j%v==0: p=True break if not p: if N%j==0: c-=1 if N%(j**2)==0: c-=1 if c==0: f=True break P.append(j) print("YES" if f else "NO")