Start: Nov, 12, 2017 10:00:00
2017秋Python程序设计基础培训第四次作业
End: Nov, 19, 2017 12:00:00
Time elapsed:
Time remaining:

Problem_ID: H
Result: Accepted
Time: 100ms
Memory: 24300kB
Author: lijian3256
In contest: 1124

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