# 正解
from functools import cmp_to_key
class Solution(object):
def printMinNumber(self, nums):
"""
:type nums: List[int]
:rtype: str
"""
if len(nums)==0:
return ''
# strnums = [str(i)for i in nums]
strnums = list(map(str,nums))
strnums = sorted(strnums, key=cmp_to_key(lambda x,y:int(x+y)-int(y+x)))
return ''.join(strnums)