結果

問題 No.847 Divisors of Power
ユーザー convexineqconvexineq
提出日時 2021-02-18 21:37:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 77,268 KB
最終ジャッジ日時 2023-10-13 05:15:03
合計ジャッジ時間 7,266 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,004 KB
testcase_01 WA -
testcase_02 AC 73 ms
71,352 KB
testcase_03 AC 74 ms
71,240 KB
testcase_04 AC 75 ms
71,244 KB
testcase_05 WA -
testcase_06 AC 78 ms
75,896 KB
testcase_07 AC 75 ms
71,240 KB
testcase_08 AC 79 ms
75,884 KB
testcase_09 AC 78 ms
75,876 KB
testcase_10 AC 74 ms
71,224 KB
testcase_11 AC 75 ms
71,288 KB
testcase_12 AC 78 ms
75,860 KB
testcase_13 AC 77 ms
75,172 KB
testcase_14 AC 76 ms
71,420 KB
testcase_15 AC 140 ms
77,268 KB
testcase_16 AC 77 ms
75,964 KB
testcase_17 AC 79 ms
75,948 KB
testcase_18 AC 85 ms
75,968 KB
testcase_19 AC 97 ms
76,108 KB
testcase_20 AC 81 ms
75,852 KB
testcase_21 AC 114 ms
76,996 KB
testcase_22 AC 79 ms
75,980 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):
    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