有两个正整数,求N!的K进制的位数
题目链接:
action=showproblem&problemid=3503
#includeusing namespace std;const double eps = 1e-6;const double PI = acos(-1.0);const double e = exp(1.0) ;int main(){ long long n,k; while(cin>>n>>k) printf("%.0f\n",floor((log(sqrt(2*1.0*PI*k))+k*log(k*1.0/e))/(log(n)))+1); return 0;}