本机没问题,洛谷报Runtime Error?
查看原帖
本机没问题,洛谷报Runtime Error?
673567
dagoyounger楼主2022/1/27 14:42
Runtime Error.
Program exited with code 1.

代码:

amount = int(input())
nums = input().split(' ')

for i in range(len(nums) - 1):
    for j in range(len(nums) - 1 - i):
        if int(nums[j]+nums[j+1]) < int(nums[j+1]+nums[j]):
            nums[j+1], nums[j] = nums[j], nums[j+1]

print(''.join(nums))

2022/1/27 14:42
加载中...