結果
| 問題 |
No.8023 素数判定するだけ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-12 17:01:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 1,000 ms |
| コード長 | 294 bytes |
| コンパイル時間 | 188 ms |
| コンパイル使用メモリ | 81,964 KB |
| 実行使用メモリ | 54,044 KB |
| 最終ジャッジ日時 | 2024-11-21 09:53:19 |
| 合計ジャッジ時間 | 4,810 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
n = int(input())
f = True
s = True
p = True
if not(True ^ n):
print("NO")
exit()
for i in range(n):
if f:
f = False
continue
if s:
s = False
continue
if p and not(n % i) and n != i:
p = False
if p:
print("YES")
else:
print("NO")