posts - 100,  comments - 15,  trackbacks - 0
/*
 * poj1423.cpp
 *  
 *  Created on: 2010-10-5
 *      Author: wyiu
 
*/

#include 
<cstdio>
#include 
<cstring>
#include 
<cmath>
using namespace std;

const double PI = 3.1415926535897932384626433832795;

const double E = 2.71828182845904523536;

int main()
{
    
int m, n;
    
double t;
    
int result;

    scanf(
"%d"&m);

    
while(m--)
    {
        scanf(
"%d"&n);

        t 
= 0.5*log10(2.0*PI*n)+n*log10(n/E);
        result 
= (int)t;
        result
++;
        printf(
"%d\n", result);
        fflush(stdout);
    }
    
return 0;
}
posted on 2010-10-05 17:08 wyiu 阅读(369) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理