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

Problem_ID: H
Result: Accepted
Time: 51ms
Memory: 25316kB
Author: 15024334404
In contest: 1296

while True:
    try:
        s = input()
        l =  s.replace("-", "")
        
        total = 0
        for i in range(1,10):
           total += int(l[i-1])*i
        d = total % 11
        if d == 10:
            if l[-1] == "X":
                print("Right")
            else:
                print(s[:-1]+"X")
        else:
            if l[-1] == str(d):
                print("Right")
            else:
                print(s[:-1]+str(d))
     

    except EOFError:
        break