讨论 / 提交了5次都是wa20
lxl 2012-07-08 01:52:00
点我顶贴 收藏 删除
救命啊!!

var

s:string;

a,b:int64;

jieguo:qword;

fushu:boolean;

i,j,k,l,m,n:longint;

begin

readln(a,b);

fushu:=false;

if a=b then begin writeln('0');halt;end;

if (a<0) and (b>0) then begin jieguo:=-a+b;fushu:=true;end;

if (a>0) and (b<0) then jieguo:=-b+a;

if (a>0) and (b>0) then

if a<b then begin fushu:=true;jieguo:=b-a;end

else

jieguo:=a-b;

if (a<0) and (b<0) then

if abs(a)>abs(b) then begin fushu:=true;jieguo:=abs(a)-abs(b);end

else

jieguo:=abs(b)-abs(a);

k:=1;

while jieguo>0 do

if k mod 4<>0 then

begin

s[k]:=chr((jieguo mod 10)+48);

jieguo:=jieguo div 10;

inc(k);

end

else

begin

s[k]:=',';

inc(k);

end;

if fushu=true then begin s[k+1]:='-';for i:=k+1 downto 1 do write(s[i]);end

else

begin

for i:=k downto 1 do write(s[i]);

end;

end.

状态: Unaccepted

测评机: Xeond[6]

得分: 20分

提交日期: 2010-9-4 20:12:00

有效耗时: 47毫秒

测试结果1:

测试结果2:

测试结果3:

测试结果4: [RQNOJ1]测试结果错误.错误结果为:-</tr><tr><td>测试结果5:</td><td><textarea name="textarea3" cols="60" rows="2">测试结果错误.错误结果为:</tr>

<tr>

<td valign="top">

#1 lxl@2010-09-04 05:17:00
回复 删除
紧急

紧急呼叫renqing!!

#2 liangjs@2012-07-08 01:52:00
回复 删除
哈哈

我也是这样、、、、

查看更多回复
提交回复