From 2ec309e8dadad749239518fe43a7cbf650bd3069 Mon Sep 17 00:00:00 2001 From: xiaofu89120 <252302786@qq.com> Date: Sat, 21 Nov 2020 22:30:28 +0800 Subject: [PATCH] =?UTF-8?q?first=5F=E5=86=92=E6=B3=A1=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-fhx | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test-fhx diff --git a/test-fhx b/test-fhx new file mode 100644 index 0000000..f54a502 --- /dev/null +++ b/test-fhx @@ -0,0 +1,10 @@ +nums [1,2,3,4,9,5,6,7,8] +length= nums(len) +for i in range(length-1) + for m in range(length-1-i) + if nums[m] > nums[m+1]: +# nums[m],nums[m+1] = nums[m+1],nums[m] + tmp = nums[m] + nums[m] = nums[m+1] + nums[m+1] = tmp +print(nums) \ No newline at end of file -- Gitee