結果

問題 No.36 素数が嫌い!
ユーザー Maboy
提出日時 2017-05-03 19:13:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 859 ms / 5,000 ms
コード長 248 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-27 01:06:33
合計ジャッジ時間 10,793 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
c=0
if N:
    while N&1==0:
        N=N>>1 
        c+=1
        if c>2:break
    for i in range(3,int(N**.5)+1,2):
        while N%i==0:
            N//=i
            c+=1
            if c>2:break
c+=(N!=1)
print(["NO","YES"][c>2])
0