|
|
вернуться в форумWA#10 Послано Bobur 7 фев 2008 21:44 here my code begin read(n); for i := 1 to n do read(a[i]); max := 1; for i := 1 to n do begin j := 0; x := i; repeat inc(j); x := a[x]; until x = i; b[i] := j; if max < b[i] then max := b[i]; end; i := 1; repeat max := max*i; j := 1; q := true; repeat if max mod b[j]=0 then inc(j) else q := false; until (j=n+1) or (q=false); inc(i); until q; writeLn(max); end. plz help, i've WA#10. thanks! Re: WA#10 Послано Bobur 7 фев 2008 21:48 sorry, now i'VE WA#12!! thanks Re: WA#10 Послано Bobur 7 фев 2008 23:27 now, TLE #13, i need help |
|
|