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: 50ms
Memory: 25312kB
Author: 13858874881
In contest: 1300

while 1:
    try:
        s = list(input())
        ans = int(s[0])*1 + 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
        ans = ans % 11
        if s[12] == 'X' : res = 10
        else : res = int(s[12])
        if ans == res : print("Right")
        else:
            if ans == 10 : s[12] = 'X'
            else : s[12] = str(ans)
            for i in s:print(i, end = "")
    except:break