結果

問題 No.847 Divisors of Power
ユーザー convexineqconvexineq
提出日時 2021-02-18 21:44:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 80,520 KB
最終ジャッジ日時 2023-10-13 05:24:21
合計ジャッジ時間 6,264 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
75,832 KB
testcase_01 WA -
testcase_02 AC 66 ms
71,440 KB
testcase_03 AC 67 ms
71,156 KB
testcase_04 AC 67 ms
71,352 KB
testcase_05 WA -
testcase_06 AC 71 ms
75,996 KB
testcase_07 AC 67 ms
71,244 KB
testcase_08 AC 70 ms
75,828 KB
testcase_09 AC 67 ms
75,932 KB
testcase_10 AC 66 ms
71,340 KB
testcase_11 AC 68 ms
71,452 KB
testcase_12 AC 70 ms
75,984 KB
testcase_13 AC 71 ms
75,260 KB
testcase_14 AC 69 ms
71,356 KB
testcase_15 AC 125 ms
77,296 KB
testcase_16 AC 71 ms
76,000 KB
testcase_17 AC 71 ms
75,888 KB
testcase_18 AC 73 ms
76,156 KB
testcase_19 AC 88 ms
76,232 KB
testcase_20 AC 73 ms
75,880 KB
testcase_21 AC 105 ms
77,120 KB
testcase_22 AC 72 ms
75,944 KB
testcase_23 TLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,m = map(int,input().split())

fac = []
for i in range(2,n+1):
    if n < i*i:
        fac.append((n,k))
        break
    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