Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
90363 蒙恒羽 插入排序 Python3 Output Limit Exceeded 35 MS 3772 KB 272 2024-09-11 20:44:06

Tests(0/10):


Code:

n = int(input()) nums = list(int(i) for i in input().split()) for i in range(1, len(nums)): key = nums[i] j = i - 1 while j >= 0 and key < nums[j]: nums[j + 1] = nums[j] j -= 1 print(nums) nums[j + 1] = key print(nums)