結果

問題 No.36 素数が嫌い!
ユーザー syunsukesyunsuke
提出日時 2020-09-19 10:35:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 233 ms / 5,000 ms
コード長 271 bytes
コンパイル時間 630 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 76,568 KB
最終ジャッジ日時 2023-09-05 12:03:57
合計ジャッジ時間 5,783 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 147 ms
76,196 KB
testcase_01 AC 160 ms
76,568 KB
testcase_02 AC 75 ms
71,460 KB
testcase_03 AC 74 ms
71,476 KB
testcase_04 AC 74 ms
71,400 KB
testcase_05 AC 79 ms
76,276 KB
testcase_06 AC 79 ms
76,244 KB
testcase_07 AC 79 ms
76,188 KB
testcase_08 AC 76 ms
71,656 KB
testcase_09 AC 77 ms
71,636 KB
testcase_10 AC 78 ms
76,252 KB
testcase_11 AC 120 ms
76,196 KB
testcase_12 AC 212 ms
76,128 KB
testcase_13 AC 210 ms
75,980 KB
testcase_14 AC 80 ms
76,092 KB
testcase_15 AC 74 ms
71,976 KB
testcase_16 AC 76 ms
71,608 KB
testcase_17 AC 76 ms
71,132 KB
testcase_18 AC 74 ms
71,964 KB
testcase_19 AC 135 ms
76,212 KB
testcase_20 AC 223 ms
76,216 KB
testcase_21 AC 187 ms
76,272 KB
testcase_22 AC 191 ms
76,004 KB
testcase_23 AC 145 ms
76,212 KB
testcase_24 AC 102 ms
76,568 KB
testcase_25 AC 150 ms
75,988 KB
testcase_26 AC 163 ms
76,132 KB
testcase_27 AC 217 ms
76,164 KB
testcase_28 AC 163 ms
76,228 KB
testcase_29 AC 233 ms
76,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

if N<=7:
    print("NO")
    exit()
cnt=0
for i in range(2,int(N**0.5)+2):
    while N%i==0:
        cnt+=1
        N//=i
        if cnt==3:
            print("YES")
            exit()
if N>1:
    if cnt>=2:
        print("YES")
        exit()
print("NO")
0