結果

問題 No.36 素数が嫌い!
ユーザー convexineqconvexineq
提出日時 2020-11-25 06:45:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 151 ms / 5,000 ms
コード長 741 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 75,876 KB
最終ジャッジ日時 2023-10-01 01:39:50
合計ジャッジ時間 4,142 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
75,404 KB
testcase_01 AC 77 ms
75,464 KB
testcase_02 AC 75 ms
71,280 KB
testcase_03 AC 78 ms
71,244 KB
testcase_04 AC 75 ms
71,120 KB
testcase_05 AC 78 ms
75,408 KB
testcase_06 AC 76 ms
75,404 KB
testcase_07 AC 76 ms
75,876 KB
testcase_08 AC 76 ms
71,456 KB
testcase_09 AC 75 ms
71,572 KB
testcase_10 AC 77 ms
75,492 KB
testcase_11 AC 97 ms
75,484 KB
testcase_12 AC 146 ms
75,652 KB
testcase_13 AC 151 ms
75,476 KB
testcase_14 AC 77 ms
75,452 KB
testcase_15 AC 72 ms
71,240 KB
testcase_16 AC 72 ms
71,400 KB
testcase_17 AC 71 ms
71,148 KB
testcase_18 AC 70 ms
71,448 KB
testcase_19 AC 75 ms
75,840 KB
testcase_20 AC 75 ms
75,428 KB
testcase_21 AC 86 ms
75,596 KB
testcase_22 AC 78 ms
75,368 KB
testcase_23 AC 74 ms
75,556 KB
testcase_24 AC 86 ms
75,460 KB
testcase_25 AC 88 ms
75,680 KB
testcase_26 AC 101 ms
75,468 KB
testcase_27 AC 77 ms
75,424 KB
testcase_28 AC 101 ms
75,760 KB
testcase_29 AC 75 ms
75,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def prime_factorize(N): #素因数分解
    exponent = 0
    while N%2 == 0:
        exponent += 1
        N //= 2
    if exponent: factorization = [[2,exponent]]
    else: factorization = []
    i=1
    while i*i <=N:
        i += 2
        if N%i: continue
        exponent = 0
        while N%i == 0:
            exponent += 1
            N //= i
        factorization.append([i,exponent])
    if N!= 1: factorization.append([N,1])
    assert N != 0, "zero"
    return factorization

# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read

#a,b,c = map(int,readline().split())
n = int(input())
lst = prime_factorize(n)
ok = 0
if sum(e for p,e in lst) >= 3:
    print("YES")
else:
    print("NO")
0