Python3 代码
def sort(nums, l, r):
for i in range (l, r+1):
for j in range (i, r+1):
if (nums [i] > nums [j]):
nums[i], nums[j] = nums[j], nums[i]
s, l, r = map(int, input().split())
nums = list(map(int, input().split()))
sort(nums, l, r)
for i in range (s):
print (nums[i], end = " ")