結果

問題 No.36 素数が嫌い!
ユーザー flippergoflippergo
提出日時 2020-12-31 18:38:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 438 bytes
コンパイル時間 206 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 187,648 KB
最終ジャッジ日時 2024-04-18 00:01:44
合計ジャッジ時間 39,288 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,146 ms
187,008 KB
testcase_01 AC 1,214 ms
186,752 KB
testcase_02 AC 1,170 ms
187,008 KB
testcase_03 AC 1,141 ms
186,880 KB
testcase_04 WA -
testcase_05 AC 1,270 ms
187,136 KB
testcase_06 AC 1,280 ms
187,648 KB
testcase_07 AC 1,272 ms
187,264 KB
testcase_08 AC 1,308 ms
186,880 KB
testcase_09 AC 1,266 ms
186,880 KB
testcase_10 AC 1,266 ms
186,880 KB
testcase_11 AC 1,169 ms
187,008 KB
testcase_12 AC 1,158 ms
186,880 KB
testcase_13 WA -
testcase_14 AC 1,167 ms
187,264 KB
testcase_15 AC 1,208 ms
187,264 KB
testcase_16 AC 1,171 ms
187,136 KB
testcase_17 AC 1,205 ms
186,880 KB
testcase_18 AC 1,207 ms
186,880 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 1,213 ms
187,136 KB
testcase_25 AC 1,177 ms
187,008 KB
testcase_26 AC 1,159 ms
186,880 KB
testcase_27 AC 1,285 ms
187,008 KB
testcase_28 AC 1,163 ms
186,624 KB
testcase_29 AC 1,200 ms
187,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P = [i for i in range(10**7+1)]
for i in range(2,int((10**7)**0.5)+1):
    for j in range(i*i,10**7+1,i):
        P[j]=P[i]
Q = []
for i in range(2,10**7+1):
    if P[i]==i:
        Q.append(i)
N = int(input())
C = {}
flag = 0
for q in Q:
    while N%q==0:
        if q not in C:
            C[q] = 0
        C[q] += 1
        if C[q]>1:
            flag = 1
        N = N//q
if len(C)>2 or flag==1:
    print("YES")
else:
    print("NO")
0