标签:blog http io os sp div 2014 log amp
运用斯特林公式。。。。。--!
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <cmath> #define PI 3.141592653 #define E 2.71828182 using namespace std; int main(){ int T; double n; scanf("%d",&T); while(T--){ scanf("%lf",&n); int ans=(int)(log10(2*PI*n)/2+n*log10(n/E)); printf("%d\n",ans+1); } return 0; }
标签:blog http io os sp div 2014 log amp
原文地址:http://www.cnblogs.com/jie-dcai/p/4021290.html