結果

問題 No.36 素数が嫌い!
コンテスト
ユーザー ABKZ
提出日時 2021-11-20 22:14:14
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 238 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 359 ms
コンパイル使用メモリ 85,292 KB
実行使用メモリ 59,372 KB
最終ジャッジ日時 2026-03-05 06:05:52
合計ジャッジ時間 2,879 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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")
0