# 最大数

<p>给定一组非负整数 <code>nums</code>，重新排列每个数的顺序（每个数不可拆分）使之组成一个最大的整数。</p>

<p><strong>注意：</strong>输出结果可能非常大，所以你需要返回一个字符串而不是整数。</p>

<p> </p>

<p><strong>示例 1：</strong></p>

<pre>
<strong>输入<code>：</code></strong><code>nums = [10,2]</code>
<strong>输出：</strong><code>"210"</code></pre>

<p><strong>示例 2：</strong></p>

<pre>
<strong>输入<code>：</code></strong><code>nums = [3,30,34,5,9]</code>
<strong>输出：</strong><code>"9534330"</code>
</pre>

<p><strong>示例 3：</strong></p>

<pre>
<strong>输入<code>：</code></strong>nums = [1]
<strong>输出：</strong>"1"
</pre>

<p><strong>示例 4：</strong></p>

<pre>
<strong>输入<code>：</code></strong>nums = [10]
<strong>输出：</strong>"10"
</pre>

<p> </p>

<p><strong>提示：</strong></p>

<ul>
	<li><code>1 <= nums.length <= 100</code></li>
	<li><code>0 <= nums[i] <= 10<sup>9</sup></code></li>
</ul>


## template

```python

class Solution(object):
    def largestNumber(self, nums):
        n = len(nums)

        for i in range(n):
            for j in range(n - i - 1):
                temp_1 = str(nums[j])
                temp_2 = str(nums[j + 1])
                if int(temp_1 + temp_2) < int(temp_2 + temp_1):
                    temp = nums[j]
                    nums[j] = nums[j + 1]
                    nums[j + 1] = temp
        output = ""
        for num in nums:
            output = output + str(num)
        return str(int(output))

```

## 答案

```python

```

## 选项

### A

```python

```

### B

```python

```

### C

```python

```