結果

問題 No.36 素数が嫌い!
ユーザー vwxyzvwxyz
提出日時 2022-02-17 02:17:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 8,240 KB
最終ジャッジ日時 2023-09-11 17:22:41
合計ジャッジ時間 9,069 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,068 KB
testcase_01 AC 57 ms
8,212 KB
testcase_02 AC 15 ms
7,836 KB
testcase_03 AC 15 ms
8,068 KB
testcase_04 WA -
testcase_05 AC 20 ms
8,072 KB
testcase_06 AC 21 ms
8,000 KB
testcase_07 AC 22 ms
8,072 KB
testcase_08 AC 16 ms
8,020 KB
testcase_09 AC 15 ms
8,140 KB
testcase_10 AC 15 ms
8,004 KB
testcase_11 AC 740 ms
7,984 KB
testcase_12 AC 2,234 ms
8,012 KB
testcase_13 WA -
testcase_14 AC 23 ms
8,172 KB
testcase_15 AC 16 ms
8,140 KB
testcase_16 AC 15 ms
8,100 KB
testcase_17 AC 15 ms
7,840 KB
testcase_18 AC 15 ms
8,068 KB
testcase_19 AC 15 ms
8,060 KB
testcase_20 AC 86 ms
8,172 KB
testcase_21 AC 16 ms
8,020 KB
testcase_22 AC 15 ms
8,188 KB
testcase_23 AC 16 ms
8,112 KB
testcase_24 AC 334 ms
8,192 KB
testcase_25 AC 16 ms
8,076 KB
testcase_26 AC 820 ms
8,048 KB
testcase_27 AC 55 ms
8,068 KB
testcase_28 AC 783 ms
8,068 KB
testcase_29 AC 32 ms
8,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
cnt=0
for p in range(2,N):
    if p**2>N:
        print("NO")
        exit()
    while N%p==0:
        N//=p
        cnt+=1
        if cnt==2:
            print("YES")
            exit()
print("NO")
0