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: 79ms
Memory: 25316kB
Author: 2018212212099
In contest: 1300

while True:
    try:
        a=input().split('-')
        b=''.join(a)
        l=len(b)
        iCount=1
        iSum=0
        for i in range(l-1):
            iSum=iSum+int(b[i])*iCount
            iCount+=1
        if b[l-1]=='X':
            if iSum%11==10:
                print("Right")
            else:
                c=iSum%11
                a[3]=str(c)
                for i in range(3):
                    print(a[i],end='-')
                if a[3]=='10':
                    print("X")
                else:
                    print(a[3])
        else:
            if iSum%11==int(b[l-1]):
                print("Right")
            else:
                c=iSum%11
                a[3]=str(c)
                for i in range(3):
                    print(a[i],end='-')
                if a[3]=='10':
                    print("X")
                else:
                    print(a[3])
    except EOFError:
        break