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: 136ms
Memory: 21428kB
Author: leo
In contest: 1088

while True:
	w =raw_input().strip('-')
	ss=0
	t=0
	for i in range(len(w)-1):
		if w[i]=='-':
			t=t+1
		else:
			ss+=int(w[i])*(i+1-t)
	if ss%11 ==10:
		testC='X'
	else:
		testC=str(ss%11)
	if testC ==w[len(w)-1]:
		print 'Right'
	else:
		c=w[0:-1]+testC
		print c