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

while True:
    try:
        a=input()
        s=0
        total=''
        num1=a.split('-')
        for i in num1:
            total+=i
        for i in range(len(total)-1):
            s+=(i+1)*int(total[i])
        if s % 11==10 and total[9]=='X':
            print('Right')
        elif str(s % 11)==total[9] and s % 11 <10:
            print('Right')
        elif s % 11==10 and total[9]!='X':
            print(total[0]+'-'+total[1:4]+'-'+total[4:9]+'-'+'X')
        else:
            print(total[0]+'-'+total[1:4]+'-'+total[4:9]+'-'+str(s % 11))
            
    except EOFError:
        break