#include using namespace std; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) #define repe(i,a)for(auto &i:a) void in(){} template void in(Head&& head,Tail&&... tail){cin>>head;in(forward(tail)...);} //N^Kの正の約数 //n^k=n*n...*n(k); map enumpr(int n) { map V; for(int i=2;i*i<=n;i++) while(n%i==0) V[i]++,n/=i; if(n>1) V[n]++; return V; } int fastpow(int x, int n) { int ret = 1; while (0 < n) { if ((n % 2) == 0) x *= x, n >>= 1; else ret *= x, --n; } return ret; } int n,k,m; //候補を決定 vector> primes; int dfs(int cu, int tot) { if(cu == primes.size()) return 1; int res = 0; rep2(cnt, 0, primes[cu].second + 1) { int tot2 = tot * fastpow(primes[cu].first, cnt); //M 以下のものの個数 if(m < tot2) break; res += dfs(cu + 1, tot2); } return res; } int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); in(n,k,m); auto ep=enumpr(n); repe(p,ep)primes.push_back({p.first,p.second*k}); cout<