| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
大牛看看为什么会错啊?打表法#include <stdio.h>
main()
{
long n,i;
double a[100000];
a[0]=0;
for(i=1;i<100000;i++)
a[i]+=a[i-1]+0.5/i;
printf("Cards Overhang\n");
while(scanf("%d",&n)!=EOF)
printf("%5d %.3lf\n",n,a[n]);
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator