#include "bits/stdc++.h" #define REP(i, n ,N) for(ll i = (n); i < (N); i++) #define p(s) cout<<(s)<> prime_factor(ll n) { vector> vp; // iがsqrt(n)となるまで繰り返す for (ll i = 2; i*i <= n; i++) { if (n%i == 0) { // iが素因数 vp.emplace_back(i, 0); // 素因数の数を求める do { vp.back().second+=K; n /= i; } while (n%i == 0); } } if (n != 1) vp.emplace_back(n, K); return vp; } vector> primes; ll dfs(ll now, ll id) { if(id==primes.size()) return now <= M; ll ret = 0; REP(i, 0, primes[id].second) { ret += dfs(now, id+1); now *= primes[id].first; if(now > M) break; } return ret; } int main(){ cin >> N >> K >> M; primes = prime_factor(N); p(dfs(1, 0)); return 0; }