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

while True:
    try:
        t = input()
        s = list(t)
        s.remove('-')
        s.remove('-')
        s.remove('-')
        yx = sum( list(int(s[i])*(i+1) for i in range(len(s)-1))) % 11
        print( ( t[0:-1] + (str(yx) if yx != 10 else "X") ) if yx != int( t[-1] if t[-1] != "X" else 10 ) else "Right" )

    except EOFError:
        break