結果
問題 |
No.847 Divisors of Power
|
ユーザー |
![]() |
提出日時 | 2021-02-18 21:37:26 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 423 bytes |
コンパイル時間 | 248 ms |
コンパイル使用メモリ | 81,664 KB |
実行使用メモリ | 75,776 KB |
最終ジャッジ日時 | 2024-09-15 02:38:49 |
合計ジャッジ時間 | 5,393 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | AC * 21 WA * 2 TLE * 1 -- * 2 |
ソースコード
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)