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 |
why WA (code Pascal) Help 1942 !!!!!!!program p1942; var n,m,max,min:longint; out:int64; procedure init; begin readln(n,m); if (n=0) and (m=0) then halt; if n>m then begin max:=n;min:=m end else begin max:=m;min:=n end; end; procedure main; var i,j:longint; begin j:=1; for i:=(n+m) downto max+1 do begin out:=out*i div j; inc(j); end; writeln(out); end; begin rewrite(output); repeat out:=1; init; main; until false; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator