class Solution(object):
def largestNumber(self, nums):
"""
:type nums: List[int]
:rtype: str
"""
nums=[str(i)for i in nums]
nums.sort(key=lambda x:x*9,reverse=True)
return str(int("".join(nums)))
179.最大数-LeetCode(Python)
于 2024-05-11 19:14:26 首次发布