|
|
вернуться в форумHere's my AC program ! Here is my AC program: var a: array[0..100000]of integer; v: array[1..10]of integer; n,i,k,j: longint; begin a[0]:=0; a[1]:=1; for i:=2 to 100000 do begin if i mod 2=0 then a[i]:=a[i shr 1] else a[i]:=a[i shr 1]+a[i shr 1+1]; end; k:=0; readln(n); while n>0 do begin inc(k); j:=1; for i:=2 to n do if a[i]>j then j:=a[i]; v[k]:=j; readln(n); end; for i:=1 to k do writeln(v[i]); end. Re: Here's my AC program ! Thanx!! Re: Here's my AC program ! Thank you.Because I used your program.Thank. Re: Here's my AC program ! Послано Bobur 19 дек 2007 20:43 thanks alot, because i find my mistake with your code |
|
|