結果

問題 No.36 素数が嫌い!
ユーザー L-aquaL-aqua
提出日時 2019-12-07 20:28:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 362 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 75,532 KB
最終ジャッジ日時 2023-08-27 01:40:48
合計ジャッジ時間 4,202 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
75,420 KB
testcase_01 AC 71 ms
75,420 KB
testcase_02 AC 67 ms
71,516 KB
testcase_03 AC 68 ms
71,572 KB
testcase_04 AC 73 ms
71,388 KB
testcase_05 AC 71 ms
75,252 KB
testcase_06 AC 72 ms
75,380 KB
testcase_07 AC 71 ms
75,392 KB
testcase_08 AC 69 ms
71,228 KB
testcase_09 AC 68 ms
71,232 KB
testcase_10 AC 72 ms
75,388 KB
testcase_11 AC 95 ms
75,356 KB
testcase_12 AC 140 ms
75,272 KB
testcase_13 AC 143 ms
75,420 KB
testcase_14 AC 68 ms
75,436 KB
testcase_15 AC 68 ms
71,388 KB
testcase_16 AC 68 ms
71,156 KB
testcase_17 AC 67 ms
71,228 KB
testcase_18 AC 68 ms
71,336 KB
testcase_19 AC 71 ms
75,156 KB
testcase_20 AC 71 ms
75,252 KB
testcase_21 AC 80 ms
75,248 KB
testcase_22 AC 70 ms
75,272 KB
testcase_23 AC 67 ms
75,416 KB
testcase_24 AC 80 ms
75,396 KB
testcase_25 AC 81 ms
75,380 KB
testcase_26 AC 94 ms
75,272 KB
testcase_27 AC 70 ms
75,268 KB
testcase_28 AC 95 ms
75,532 KB
testcase_29 AC 70 ms
75,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n = int(input())
if len(prime_factorize(n)) >= 3:
    print("YES")
else:
    print("NO")
0