有两个正整数,求N!的K进制的位数
题目链接:http://sdutacm.org/sdutoj/problem.php?
action=showproblem&problemid=3503
#include <bits/stdc++.h> using 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 ",floor((log(sqrt(2*1.0*PI*k))+k*log(k*1.0/e))/(log(n)))+1); return 0; }