Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
给个PASCAL的AC程序Program Pku_1003; Var sum:double; i,n:longint; c:array[1..10000] of real; //===================================== Begin n:=0; Repeat n:=n+1; Readln(c[n]); Until c[n]=0.0; For i := 1 to n -1 do Begin n := 1; sum := 0; While sum<c[i] do Begin n := n + 1; sum := sum + 1/n; End; n:=n-1; WriteLn(n,' card(s)'); End; readln; End. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator