|
|
вернуться в форумIts very very easy!!! Послано RASTA 19 мар 2009 13:33 my idea for solution k := 2; n := length(s); s1 := s[1]; while true do begin i := 0; while (n - i >= k + i) and (s[k + i] = s[n - i]) do inc(i); if n - i <= k + i then begin write(s + s1); halt; end; s1 := s[k] + s1; inc(k); end; |
|
|