python3,听取WA声一片
查看原帖
python3,听取WA声一片
893114
denghuolanshan_1004楼主2023/1/6 16:45
b=int(input())
c=[]
d=[]
a=list(map(int,input().split()))
for i in range(0,b):
    for j in range(0,len(c)):
        if c[j] != a[i]:
            c.append(a[i])

print(len(c))

smallest=1001

for i in range(0,len(c)):
    smallest=1001
    for j in range(0,len(c)):
        if c[j]<smallest:
            smallest=c[j]
    d.append(smallest)
    c.remove(smallest)
print(" ".join(str(i)for i in d))
2023/1/6 16:45
加载中...