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

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

Posted by lyc1989 at 2009-08-20 15:36:45 on Problem 1607
In Reply To:苍天了,这题也太水了,5分钟AC Posted by:julyflame at 2009-03-12 22:27:27
> #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