标签:big ble nbsp def ges png mes 描述 alt
题目描述:
源码:
#include"iostream" #include"cmath" using namespace std; #define PI 3.1415926 #define E 2.718281828459045 int main() { int n, num; double sum; cin>>n; for(int i = 0; i < n; i++) { cin>>num; // sum = 0; // for(int i = 1; i <= num; i++) // sum += log10(i); //下面的一行代码等价于上面的注释 sum = log10(sqrt(2*PI*num)) + num * log10(num/E);//斯特林公式 cout<<(int)sum+1<<endl; } return 0; }
标签:big ble nbsp def ges png mes 描述 alt
原文地址:http://www.cnblogs.com/forcheng/p/7634860.html