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: 47ms
Memory: 25200kB
Author: 13868552080
In contest: 1300

while True:
    try:
        isbn=input()
        f="".join(list(isbn.split('-')))
        s=0
        for i in range(len(f)-1):
            s=(int(f[i])*(i+1))+s
        s=s%11
        if "X"==f[-1]:
            if s==10:
                print("Right")
            else:
                isbn=isbn[:-1]+str(s)
                print(isbn)   
    
        else:
            if s==int(f[-1]):
                print("Right")
            else:
                if s==10:
                    s="X"
                isbn=isbn[:-1]+str(s)
                print(isbn)
    except EOFError:
        break