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:What it said?

Posted by vxk at 2003-11-10 22:28:14 on Problem 1003
In Reply To:What it said? Posted by:vxk at 2003-11-10 19:06:38
> I could not see its means.
> what it said? ?
通过了,代码如下...像是白痴一样的计算...
program hangover;
var
sum,c:extended;
m,n:integer;
begin
m:=1;
while m<>0 do
begin
c:=0;
readln(c);
if c=0.00 then exit;
sum:=0;
n:=0;
Repeat
 sum:=sum+1.0/(n+2);
 n:=n+1;
Until sum>=c;
writeln(n,' card(s)');    
end;
end.


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