Start: Apr, 17, 2017 10:00:00
Python程序设计基础培训第四次作业
End: Apr, 23, 2017 14:00:00
Time elapsed:
Time remaining:

Problem_ID: H
Result: Accepted
Time: 132ms
Memory: 21428kB
Author: 15557899509
In contest: 1088

while True:
    try:
        t=map(str,raw_input().split('-'))
        t1=''
        rel=0
        num=[1,2,3,4,5,6,7,8,9]
        for i in range(0,3):
            t1+=t[i]
        for i in range(0,len(t1)):
            rel=rel+int(t1[i])*num[i]
        rel=rel%11
        if rel==10:
            s='X'
        else:
            s=str(rel)
        xx=''
        if t[-1]==s:
            print 'Right'
        else:
            for i in range(0,3):
                xx=xx+t[i]+"-"
            print xx+s
    except IOError:
        pass