Start: Jul, 06, 2019 10:00:00
20190706Python程序设计基础培训扩展练习
End: Jul, 17, 2019 12:00:00
Time elapsed:
Time remaining:

Problem_ID: H
Result: Accepted
Time: 55ms
Memory: 25316kB
Author: 18605753875
In contest: 1300

#isbn_in=['0-670-82162-4','0-670-82162-0']
isbn_in=[]
while True:
    try:
        isbn_in.append(input())
    except EOFError:
        break
def isbn(s):
    sn=s.replace('-','')
    key=0
    for i in range(0,len(sn)-1):
        key+=int(sn[i])*(i+1)
    key=key%11
    if key==10:
        key="X"
    else:
        key=str(key)
    return s[:-1]+key
for i in isbn_in:
    if i==isbn(i):
        print("Right")
    else:
        print(isbn(i))