|
|
вернуться в форумwhy WA in 6 Послано zzzlll 3 янв 2007 22:40 there is my program var c:array[0..1800] of real; n,m,i ,fn:longint; begin readln(n,m); c[0]:=1; c[1]:=m-1; i:=1; repeat i:=i+1; {for i:=2 to n do } c[i]:=(m-1)*(c[i-1]+c[i-2]); until i>=n; writeln(c[n]:0:0); end. Re: why WA in 6 Use long arithmetics! long arithmetics Use long arithmetics! с этим не катит! всё равно WA #7 Re: long arithmetics Send me your solution to my e-mail w_soulreaver[at]ukr[dot]net .And I'll try to help you! :) my solution I send to you my solution |
|
|