|
|
вернуться в форумhelp me!!! Where is the mistake in my program? I got WA on test 7 var litere:string; afis,s,x:array[1..260000]of char; i,j,k,nr,af:longint; begin for i:=65 to 90 do litere:=litere+chr(i); for i:=97 to 122 do litere:=litere+chr(i); while not eof do begin inc(nr); read(s[nr]); end; i:=1; while i<nr do begin while (pos(s[i],litere)=0)and(i<=nr) do begin inc(af);afis[af]:=s[i];inc(i);end; j:=i; while (pos(s[i],litere)<>0)and(i<=nr) do inc(i); for k:=i-1 downto j do begin inc(af); afis[af]:=s[k]; end; end; for i:=1 to af do write(afis[i]); end. |
|
|