3.10 PAT1023 乙级 python

组个最小数

x = list(input().split())
lst = ''
for i in range(10):
	lst += str(i)*int(x[i])
otpt = ''
t = 0
for i in lst:
	if otpt == '' and i =='0':
		pass
	else:
		k = i
		otpt += i
		break
for i in lst:
	if i == k and t == 0:
		t = 1
		pass
	else:
		otpt += i
print(otpt)

猜你喜欢

转载自blog.csdn.net/qq_39782006/article/details/88380388