摘要:
#include int main(){ double table[100001]; double t=2.0; table[1]=0.5; for(int i=2;i<100001;i++) { t+=2; table[i]=table[i-1]+1.0/t; } printf("# Cards Overhang\n"); int n; while(scanf("%d",&n)!=EOF) { printf("%5d%10.3lf\n",n,table[n]); } ... 阅读全文