此题水炸天~~~

贴出丑陋超短代码供大家BS~~
var a:string;i,j:longint;
begin
readln(a);
if a[1]='-' then begin
write('-');
delete(a,1,1);
end;
i:=length(a);
while a[i]='0' do dec(i);
for j:=i downto 1 do write(a[j]);
end.

2 条评论

  • @ 2016-11-26 17:04:26
    // input code here
    
  • @ 2014-10-29 20:22:13

    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.

  • 1

信息

ID
1756
难度
4
分类
模拟 点击显示
标签
递交数
3911
已通过
1766
通过率
45%
被复制
22
上传者