pascal AC

var
i,s,k:longint;
x:char;
st,a:string;
begin
for i:=1 to 13 do begin
read(a[i]);
if i<>13 then st:=st+a[i];
if (a[i]<>'-')and(i<>13) then begin inc(k); s:=s+(ord(a[i])-ord('0'))*k; end;
end;
if s mod 11=10 then x:='X'
else x:=chr(s mod 11+ord('0'));
if x=a[13] then writeln('Right')
else write(st+x);
end.

0 条评论

目前还没有评论...

信息

ID
1484
难度
5
分类
字符串 点击显示
标签
递交数
14393
已通过
4933
通过率
34%
被复制
32
上传者