結果
| 問題 | No.847 Divisors of Power |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-02-18 21:44:03 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 426 bytes |
| 記録 | |
| コンパイル時間 | 336 ms |
| コンパイル使用メモリ | 84,844 KB |
| 実行使用メモリ | 81,024 KB |
| 最終ジャッジ日時 | 2026-04-04 16:42:48 |
| 合計ジャッジ時間 | 7,210 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | AC * 22 WA * 2 TLE * 2 |
ソースコード
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)
convexineq