#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; vector> prime_factorize(long long N){ vector> res; for(long long a = 2; a * a <= N; ++a){ if(N % a != 0) continue; long long ex = 0; while(N % a == 0) ++ex, N /= a; res.push_back({a,ex}); } if(N != 1) res.push_back({N,1}); return res; } int main(){ cin.tie(0); ios::sync_with_stdio(0); // max: 2,3,5,7,11,13,17,19,23 ll N,K,M; cin >> N >> K >> M; auto pf = prime_factorize(N); int ans = 0; function dfs = [&](int i, ll x) -> void { if(i == int(pf.size())) { if(x <= M) ans++; } else { auto [p, e] = pf[i]; int cnt = 0; do { dfs(i + 1, x); x *= p; cnt++; } while(x <= M && cnt <= e * K); } }; dfs(0, 1LL); cout << ans << endl; }