1、1200000的约数
lst=[]
num=0
for i in range(1,12000001):
if 1200000%i==0:
j=1200000//i
lst.append(i)
lst.append(j)
num=lst.count(i)
if num==2:
print(len(lst)-2)
break
2、排序
输入:
5
1 3 2 6 5
输出:
1 2 3 5 6
6 5 3 2 1
import os
import sys
n=int(input())
lst=[int(i) for i in input().split()]
lst.sort()
for a in lst:
print(a,end=' ')
print(end='\n')
for b in lst[::-1]:
print(b,end=' ')