讨论 / python2 17行 180ms 125528 KB
changer 2019-06-03 15:00:11
点我顶贴 收藏 删除
num = int(raw_input())

numlist = raw_input().split(' ')

result = []

for i in numlist:

i = int(i)

if i in result:

continue

else:

result.append(i)

result.sort()

print len(result)

s = ""

for i in result:

s += str(i)

s += ' '

s = s[:-1]

print s

#1 changer@2019-06-03 15:01:14
回复 删除
可以不用转成int,直接用string就行
查看更多回复
提交回复