题解 | #[NOIP2008]ISBN号码#
[NOIP2008]ISBN号码
https://www.nowcoder.com/practice/95712f695f27434b9703394c98b78ee5
n=input() a=n.split("-")[0] b=n.split("-")[1] c=n.split("-")[2] d=n.split("-")[3] m=(int(a) * 1 + int(b[0]) * 2 + int(b[1]) * 3 + int(b[2]) * 4 + int(c[0]) * 5 + int(c[1]) * 6 + int(c[2]) * 7 + int( c[3]) * 8 + int(c[4]) * 9) % 11 if m==10 and d=="X": print("Right") elif d!="X"and m==int(d): print("Right") else: if m==10: print(f"{a}-{b}-{c}-X") else: print(f"{a}-{b}-{c}-{m}")