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 jyjy at 2018-04-03 12:18:36 on Problem 1003
#include<stdio.h>
int main(){
	double c,t=0;
		scanf("%lf",&c);
	while(c!=0){
		int i;
		t=0;
		for(i=2;;i++){
			t+=1.0/i;
			if(t>=c)break;
		}
		printf("%d card(s)\n",i-1);
		scanf("%lf",&c);
	
 	}
	
	
	return 0;
}

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