結果

問題 No.2051 Divide
ユーザー Schnee
提出日時 2022-09-02 06:24:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 265 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,248 KB
最終ジャッジ日時 2024-11-15 11:12:31
合計ジャッジ時間 8,985 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b = map(int, input().split())
c = 0
while a%b==0:
    if b==1:
        c = 1
        break
    a //= b
    c += 1
i = 2
while a!=1:
    if a%i==0:
        tmp = 1
        while a%i==0:
            tmp += 1
            a //= i
        c *= tmp
    i += 1
print(c)
0