提出 #22098073


ソースコード 拡げる

import collections

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())
P = prime_factorize(N)
C = collections.Counter(P)
ans = 0
for v in C.values():
    p=1
    while v>=p:
        v-=p
        p+=1
        ans+=1
print(ans)

提出情報

提出日時
問題 D - Div Game
ユーザ H20
言語 PyPy3 (7.3.0)
得点 400
コード長 493 Byte
結果 AC
実行時間 343 ms
メモリ 66724 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 400 / 400
結果
AC × 5
AC × 32
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, hand_08.txt, hand_09.txt, hand_10.txt, hand_11.txt, hand_12.txt, hand_13.txt, hand_14.txt, hand_15.txt, hand_16.txt, hand_17.txt, hand_18.txt, hand_19.txt, hand_20.txt, hand_21.txt, hand_22.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt
ケース名 結果 実行時間 メモリ
hand_01.txt AC 343 ms 66724 KiB
hand_02.txt AC 57 ms 64568 KiB
hand_03.txt AC 58 ms 64376 KiB
hand_04.txt AC 58 ms 64452 KiB
hand_05.txt AC 57 ms 64484 KiB
hand_06.txt AC 58 ms 64408 KiB
hand_07.txt AC 58 ms 64516 KiB
hand_08.txt AC 58 ms 64376 KiB
hand_09.txt AC 65 ms 65244 KiB
hand_10.txt AC 66 ms 65320 KiB
hand_11.txt AC 66 ms 65280 KiB
hand_12.txt AC 68 ms 65120 KiB
hand_13.txt AC 68 ms 65464 KiB
hand_14.txt AC 66 ms 65096 KiB
hand_15.txt AC 56 ms 64404 KiB
hand_16.txt AC 61 ms 64560 KiB
hand_17.txt AC 59 ms 64456 KiB
hand_18.txt AC 60 ms 65300 KiB
hand_19.txt AC 57 ms 64400 KiB
hand_20.txt AC 59 ms 64548 KiB
hand_21.txt AC 64 ms 65300 KiB
hand_22.txt AC 59 ms 64528 KiB
random_01.txt AC 60 ms 65252 KiB
random_02.txt AC 59 ms 65244 KiB
random_03.txt AC 60 ms 65184 KiB
random_04.txt AC 62 ms 65304 KiB
random_05.txt AC 61 ms 64508 KiB
sample_01.txt AC 58 ms 64496 KiB
sample_02.txt AC 61 ms 64484 KiB
sample_03.txt AC 61 ms 64464 KiB
sample_04.txt AC 59 ms 65252 KiB
sample_05.txt AC 58 ms 65316 KiB