PersonalCorpus 版 (精华区)
//318385 2003-10-19 19:26:07 Accepted 1007 C++ 00:02.50 376K sino@HIT
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "ctype.h"
#include "string.h"
#include "memory.h"
int main(int argc, char* argv[])
{
#ifndef ONLINE_JUDGE
// freopen ("i1007.txt","r",stdin);
freopen ("o1007.txt","w",stdout);
#endif
double res,x,y;
int i,k;
for (i=0;i<2001;i++) {
res=0;
x=(double)i/1000;
for (k=1;k<14000;k++) {
y=(double) k;
res += (1-x)/(y+x)/(y+1)/y;
}
res += (1-x)/2/14000/14000;
printf("%5.3f %16.12f\n", x, res+1);
}
}
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.076毫秒