結果

問題 No.847 Divisors of Power
ユーザー convexineq
提出日時 2021-02-18 21:33:09
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 367 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 66,524 KB
最終ジャッジ日時 2024-09-15 02:32:11
合計ジャッジ時間 4,174 ms
ジャッジサーバーID
(参考情報)
judge6 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 4
other AC * 6 TLE * 1 -- * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,m = map(int,input().split())
fac = []
for i in range(2,n):
    c = 0
    while n%i == 0:
        n //= i
        c += 1
    if c: fac.append((i,c*k))

L = len(fac)
ans = 0
def dfs(x,i):
    global ans
    if i >= L:
        ans += 1
        return
    p,c = fac[i]
    while x <= m and c >= 0:
        dfs(x,i+1)
        x *= p
        c -= 1

dfs(1,0)
print(ans)
0