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:1003:大牛们帮忙看看为什么在vc6.0上数据都通过了却总是不过呢?

Posted by zhangsju at 2009-03-24 09:29:15 on Problem 1003
In Reply To:1003:大牛们帮忙看看为什么在vc6.0上数据都通过了却总是不过呢? Posted by:ACM_dlutlengqian at 2008-11-05 19:25:12
> #include<stdio.h>
> void main()
> {
> float c,m,sum=0;
> int i;
> do
> scanf("%f",&c);
> while(c<=0.0||c>5.20);
> for(i=2;sum<c;i++)
> {m=1.0/i;
> sum+=m;}
> printf("%d card(s)\n",i-2);
> }
> 
要求可以测试多组数据

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