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

苍天了,这题也太水了,5分钟AC

Posted by julyflame at 2009-03-12 22:27:27 on Problem 1607 and last updated at 2009-03-12 22:28:19
#include<stdio.h>
int  main()
{
	int i,n,k;
	long float sum;
	printf("Cards  Overhang\n");
	while(scanf("%d",&n)!=EOF){
		k=2;
		for(i=1,sum=0;i<=n;i++){
			sum+=1.0/k;
			k+=2;
		}
		printf("%5d",n);
		printf(" %9.3f\n",sum);
	}
}

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