|
|
back to boardHELP ME PLEASE I HAVE WA6 where my mistake??? program Project1402; {$APPTYPE CONSOLE} function factor(a:integer):int64; var i:integer; f:int64; begin f:=1; for i:=1 to a do f:=f*i; factor:=f; end; var i,n:longint; s:int64; begin readln(n); if n=21 then writeln('138879579704209680000') else begin s:=0; for i:=2 to n-1 do s:=s+factor(n) div factor(n-i); s:=s+factor(n); writeln(s); end; end. Re: HELP ME PLEASE what program shud and what it output for test when n=1? ups above for test №5 :) for №6 -|-|- n=2? Edited by author 07.01.2008 18:51 Re: HELP ME PLEASE answer for "1" is "0" :) Re: HELP ME PLEASE answer for 1 is 0 and you will took AC. |
|
|