結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2021-11-20 22:14:14 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 172 ms / 5,000 ms |
コード長 | 238 bytes |
コンパイル時間 | 446 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 57,344 KB |
最終ジャッジ日時 | 2024-06-12 02:07:16 |
合計ジャッジ時間 | 4,215 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
import math N = int(input()) d = [x for x in range(2, int(math.sqrt(N))+1) if N % x == 0] if len(d) > 1: print("YES") elif (len(d) == 1 and N % d[0] ** 2 == 0 and N != d[0] ** 2): print("YES") else: print("NO")