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: 25320kB
Author: 13666776648
In contest: 1300

while True:
    try:
        s=input()
        t=int(s[0])+int(s[2])*2++int(s[3])*3+int(s[4])*4+int(s[6])*5+int(s[7])*6+int(s[8])*7+int(s[9])*8+int(s[10])*9
        m=t%11

        if (s[-1]=="X" and m==10 ) or (s[-1]!="X" and s[-1]==str(m)):
            print("Right")
        else:
            if m==10:
                print(s[:-1]+"X")
            else:
                print(s[:-1]+str(m))
            
    except EOFError:
        break