結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-05-30 13:12:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 302 bytes |
| コンパイル時間 | 225 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 20,132 KB |
| 最終ジャッジ日時 | 2024-10-07 17:58:50 |
| 合計ジャッジ時間 | 6,652 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | AC * 1 TLE * 1 -- * 24 |
ソースコード
N=int(input())
f=False
P=[2]
if N!=1 and N!=2:
for j in range(3,int(N**0.5)):
p=False
k=0
while (not p) and k<len(P) and P[k]<=j**0.5:
p|=j%P[k]==0
if p: break
k+=1
if p:
if N%j==0:
f=True
break
else: P.append(j)
print("YES" if f else "NO")