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: 2018212212087
In contest: 1300

while True:
	try:
		s=input()
		x,y=0,0
		for i in range(len(s)-1):
			if s[i]=="-":
				y=y+1
			else:
				x+=int(s[i])*(i-y+1)
		if x%11 !=10:
			a=str(x%11)
		else:
			a="X"
		if a==s[len(s)-1]:
			print("Right")
		else:
			a=s[0:-1]+a
			print(a)
	except EOFError:
		break