結果

問題 No.36 素数が嫌い!
ユーザー popketlepopketle
提出日時 2020-02-12 00:07:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,141 ms / 5,000 ms
コード長 356 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2024-04-08 21:56:02
合計ジャッジ時間 13,888 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 551 ms
9,984 KB
testcase_01 AC 483 ms
9,984 KB
testcase_02 AC 32 ms
9,984 KB
testcase_03 AC 32 ms
9,984 KB
testcase_04 AC 32 ms
9,984 KB
testcase_05 AC 35 ms
9,984 KB
testcase_06 AC 35 ms
9,984 KB
testcase_07 AC 35 ms
9,984 KB
testcase_08 AC 32 ms
9,984 KB
testcase_09 AC 31 ms
9,984 KB
testcase_10 AC 34 ms
9,984 KB
testcase_11 AC 388 ms
9,984 KB
testcase_12 AC 1,138 ms
9,984 KB
testcase_13 AC 1,141 ms
9,984 KB
testcase_14 AC 37 ms
9,984 KB
testcase_15 AC 33 ms
9,984 KB
testcase_16 AC 33 ms
9,984 KB
testcase_17 AC 33 ms
9,984 KB
testcase_18 AC 36 ms
9,984 KB
testcase_19 AC 462 ms
9,984 KB
testcase_20 AC 832 ms
9,984 KB
testcase_21 AC 873 ms
9,984 KB
testcase_22 AC 900 ms
9,984 KB
testcase_23 AC 555 ms
9,984 KB
testcase_24 AC 215 ms
9,984 KB
testcase_25 AC 601 ms
9,984 KB
testcase_26 AC 692 ms
9,984 KB
testcase_27 AC 972 ms
9,984 KB
testcase_28 AC 680 ms
9,984 KB
testcase_29 AC 1,087 ms
9,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())

def prime_factorize(n):
    ls,tmp=[],n
    c=int(n**0.5)+1
    for i in range(2,c):
        while tmp%i==0:
            tmp=tmp//i
            ls.append(i)
        if tmp==1:
            break
    return ls
prime_factor=prime_factorize(n)
if len(prime_factor)>1 and prime_factor[0]*prime_factor[1]<n:
    print('YES')
else:
    print('NO')
0