結果

問題 No.36 素数が嫌い!
ユーザー ABKZABKZ
提出日時 2021-11-20 22:14:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 207 ms / 5,000 ms
コード長 238 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 75,616 KB
最終ジャッジ日時 2023-09-02 19:44:13
合計ジャッジ時間 5,870 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
75,616 KB
testcase_01 AC 178 ms
75,376 KB
testcase_02 AC 71 ms
71,464 KB
testcase_03 AC 69 ms
71,712 KB
testcase_04 AC 71 ms
71,460 KB
testcase_05 AC 75 ms
75,612 KB
testcase_06 AC 75 ms
75,480 KB
testcase_07 AC 74 ms
75,300 KB
testcase_08 AC 73 ms
75,540 KB
testcase_09 AC 74 ms
75,304 KB
testcase_10 AC 74 ms
75,304 KB
testcase_11 AC 118 ms
75,372 KB
testcase_12 AC 207 ms
75,500 KB
testcase_13 AC 205 ms
75,416 KB
testcase_14 AC 156 ms
75,424 KB
testcase_15 AC 69 ms
71,468 KB
testcase_16 AC 71 ms
71,616 KB
testcase_17 AC 68 ms
71,616 KB
testcase_18 AC 72 ms
75,472 KB
testcase_19 AC 124 ms
75,396 KB
testcase_20 AC 207 ms
75,304 KB
testcase_21 AC 177 ms
75,428 KB
testcase_22 AC 176 ms
75,332 KB
testcase_23 AC 135 ms
75,488 KB
testcase_24 AC 142 ms
75,428 KB
testcase_25 AC 140 ms
75,480 KB
testcase_26 AC 154 ms
75,300 KB
testcase_27 AC 184 ms
75,300 KB
testcase_28 AC 149 ms
75,284 KB
testcase_29 AC 200 ms
75,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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