#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,b,e) for(ll i=(ll)b;i<(ll)e;i++) #define rep0(i,n) REP(i,0ll,n) #define rep1(i,n) REP(i,1ll,n+1) #define shosu setprecision(10) typedef long long ll; typedef pair P; typedef pair Q; typedef pair R; ll longinf=1ll<<60; int inf=1<<29; //mleしなければぜんぶllでかく。 vector> primeFactorDecomp(ll n){ vector> ret; ll m=n; for(ll i=2;i*i<=m;i++){ if(n%i!=0) continue; ll cnt=0; while(n%i==0){ cnt++; n/=i; } ret.push_back({i,cnt}); } if(n>1){ ret.push_back({n,1}); } return ret; } ll m; ll hukugen(vector

& p){ ll ret=1; for(auto q:p){ for(int i=1;i<=q.second;i++){ ret*=q.first; if(ret >= 1e9) return 1e9+1; } } return ret; } int a[15]; ll expone[15]; int N; bool nexta(int i){ if(a[i]>=expone[i]){ a[i]=0; nexta(i+1); } else{ a[i]++; return true; } return true; } int main(){ ll n,k; cin>>n>>k>>m; vector

bunkai=primeFactorDecomp(n); N=bunkai.size(); for(int i=N;i<=N+1;i++){ bunkai.push_back(make_pair(1e9+7, 2)); } rep0(i,N+1) expone[i]= min(32ll, bunkai[i].second*k); rep0(i,N+1) a[i]=0; ll pos=1; ll ans=0; do{ if(a[N]>0) break; /*rep0(i,N){ cout< posdec(N); rep0(i,N) posdec[i]={bunkai[i].first,a[i]}; pos=hukugen(posdec); if(pos<=m&&pos>=0){ ans++; } else{ int i=0; while(a[i]==0){ a[i]=expone[i]; i++; } a[i]++; } }while(nexta(0)); cout<