- 数字反转
- 2013-09-23 22:27:55 @
RT
2 条评论
-
幻影F绝杀 LV 8 @ 2014-10-29 20:23:55
var
a:string;
b:array[1..255]of integer;
c,i,s:integer;
begin
readln(a);
if a[1]='-' then
begin
write('-');
c:=2;
end
else c:=1;
s:=length(a);
for i:=c to s do
b[i]:=ord(a[i])-48;
i:=s;
while b[i]=0 do
begin
s:=s-1;
i:=i-1;
end;
for i:=s downto c do write(b[i]);
end. -
2013-09-23 22:31:07@
把字符数组去掉了一位
于是...AC了...
- 1