(s, length=max_nums)
| 67 | |
| 68 | # 测试用下面的可以跑过 2 & 3。 |
| 69 | def makeEqual(s, length=max_nums): |
| 70 | |
| 71 | if len(s) == length: |
| 72 | return s |
| 73 | # 这种补位会通过测试,但是 Leetcode 的测试并没有包含所有的情况。 |
| 74 | x = max(s) * (length - len(s)) |
| 75 | return s+x |
| 76 | |
| 77 | # 2 |
| 78 | return ''.join(sorted(map(str, nums), cmd=mycmp, reverse=True)) |
nothing calls this directly
no outgoing calls
no test coverage detected