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: 48ms
Memory: 25320kB
Author: 13806858827
In contest: 1296

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

    except EOFError:
        break