list2 = []
for i in list1:
if i not in list2:
list2.append(i)
list2.sort()
return list2
while 1:
n = input()
list1 = []
if n == "":
break
for i in range(int(n)):
num = input()
list1.append(int(num))
result = check(list1)
print(result)
本地运行OK,牛客上运行报:
请检查是否存在语法错误或者数组越界非法访问等情况
Traceback (most recent call last):
File "/tmp/a.py3", line 10, in <module>
n = int(input())
EOFError: EOF when reading a line
求解!!!!!!!!!!!!
全部评论
(1) 回帖