|
|
back to boardWhy WA. Need help var S:string; i,j:integer; A,B:longint; begin readln(s); A:=0; B:=0; j:=length(s) div 2; if odd(length(s)) then inc(j); for i:=1 to j do begin A:=A+Ord(s[i]); end; for i:=length(s) downto j do begin B:=B+Ord(s[i]); end; if a<>b then begin for i:=length(s)-1 downto 1 do begin s:=s+s[i]; end; writeln(s); end else Writeln(s); end. Re: Why WA. Need help OOOH. I found my error |
|
|