Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

大牛看看为什么会错啊?打表法

Posted by hmh0512 at 2009-08-01 19:50:50 on Problem 1607
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator