不知道错在哪里,请大家帮忙,python3
查看原帖
不知道错在哪里,请大家帮忙,python3
483191
文渊小杨潇楼主2023/1/2 15:26

P1059

代码如下

u=input( )
t=list(map(int,input().split(" ")))
s=[]
t.sort()
if t[0]<t[1]:
   s.append(t[0])
for i in range(1,len(t)):
   if t[i]>t[i-1]:
     s.append(t[i])
print(len(s))
print(" ".join(map(str,s)))
 
2023/1/2 15:26
加载中...