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: 45ms
Memory: 25316kB
Author: 15158740827
In contest: 1296

while True:
    try:
        s = input()
        s1 = s.replace("-","")
        d = sum([int(s1[i])*(i+1) for i in range(len(s1)-1)])%11
        if d==10:
            if s[-1] == "X":
                print("Right")
            else:
                print(s[:-1]+"X")
        else:
            if s[-1] == str(d):
                print("Right")
            else:
                print(s[:-1]+str(d))            
    except EOFError:
        break