#include #include #include using namespace std; vector> X; int solve(int ind,long long nw, long long m){ if(ind == X.size())return 1; int c = 0; int ans = 0; while(c <= X[ind].second && nw <= m){ ans += solve(ind+1,nw,m); nw *= X[ind].first; c++; } return ans; } int main(){ long long n,k,m;cin>>n>>k>>m; map A; for(int i = 2; n >= i*i; i++){ int tmp = 0; while(n%i == 0){ tmp++; n/=i; } if(tmp){ A[i] = tmp*k; } } if(n != 1){ A[n] = k; } for(auto x: A){ X.push_back({x.first,x.second}); } cout << solve(0,1,m) << endl; }