|
|
back to boardHelp! WA 16. Here my code. Var i,j,n,Fi,Fj:longint; Fi1,Fn:extended; k:integer; F:array[-2001..2001] of extended; Begin Readln(i,Fi,j,Fj,n); F[0]:=0; F[1]:=1; for k:=2 to 2001 do F[k]:=F[k-1]+F[k-2]; for k:=-1 downto -2001 do F[k]:=F[k+2]-F[k+1]; Fi1:=((Fj-F[j-i-1]*Fi)/F[j-i]); Fn:=(F[n-i]*Fi1+F[n-i-1]*Fi); writeln(round(Fn)); End. Why WA#16? Edited by author 06.11.2008 13:26 |
|
|