题目:ISBN号码
状态: Unaccepted
测评机: Xeost[5]
得分: 0分
提交日期: 2012-2-29 13:23:00
有效耗时: 该状态没有记录
测试结果1: 输出过长|用户输出数据超过标准输出两倍[标准输出5位|选手输出13位]
测试结果2: 测试结果错误.错误结果为:0-670-82162-0
正确结果应为:0-670-82162-4
测试结果3: 测试结果错误.错误结果为:0-670-82162-0
正确结果应为:0-670-82162-4
测试结果4: 输出过长|用户输出数据超过标准输出两倍[标准输出5位|选手输出13位]
测试结果5: 测试结果错误.错误结果为:6-670-82162-0
正确结果应为:6-670-82162-X
测试结果6: 测试结果错误.错误结果为:7-115-13880-0
正确结果应为:7-115-13880-X
测试结果7: 输出过长|用户输出数据超过标准输出两倍[标准输出5位|选手输出13位]
测试结果8: 测试结果错误.错误结果为:7-358-86245-0
正确结果应为:7-358-86245-7
测试结果9: 测试结果错误.错误结果为:2-462-87674-0
正确结果应为:2-462-87674-X
测试结果10: 测试结果错误.错误结果为:8-739-25436-0
正确结果应为:8-739-25436-4
提交代码: view sourceprint?
01.var
02.
a,b,d,p:string;
03.
s,sh,c,i:longint;
04.
co:integer;
05.begin
06.
readln(a);
07.
for i:=1 to 11 do
08.
if not (i=2) and not (i=6) then
09.
b[i]:=a[i];
10.
val(b,c,co);
11.
for i:=1 to 9 do
12.
s:=s+c*i;
13.
sh:=s mod 11;
14.
str(sh,p);
15.
if p='10' then p:='X';
16.
d:=a;
17.
d[13]:=p[1];
18.
if a[13]=p then writeln('Right') else writeln(d);
19.end.