| ||||||||||
| 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 | |||||||||
Re:<DELPHI>I also get WA!!!In Reply To:<DELPHI>I also get WA!!! Posted by:Muchacheva_Marina at 2005-09-13 22:12:13 > I don't know were is my mistake! Please, help me find it.
>
溢出
> This is code:
>
> {$APPTYPE CONSOLE}
> {$i-,q-,r-,n+}
>
> type int = longint;
>
> var m, n, r, s, i, max : int;
> ans : extended;
>
> BEGIN
> while not eof do begin
> readln(m, n, r, s);
> ans := 1; max := 0;
> if max < m then max := m;
> if max < r then max := r;
>
> for i := 1 to max do begin
> if i <= m then ans := ans*i;
> if i <= r then ans := ans/i;
>
> if i <= s then ans := ans*i;
> if i <= n then ans := ans/i;
>
> if i <= r-s then ans := ans*i;
> if i <= m-n then ans := ans/i;
> end;
> writeln(ans:0:5);
> end;
> END.
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator