結果

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

ソースコード

diff #

import math

a, b = map(int, input().split())

c = 0
while a%b==0:
    if b==1:
        c = 1
        break
    a //= b
    c += 1
    
for i in range(2, a+1):
    if a%i==0:
        tmp = 1
        while a%i==0:
            tmp += 1
            a //= i
        c *= tmp

print(c)
0