Skip to content

Commit e2fdf77

Browse files
authored
Create 978_A.py
1 parent 0c9661b commit e2fdf77

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CodeForces/978_A.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
n = int(input())
2+
3+
seq = input().split()
4+
rep = []
5+
for i in seq:
6+
if i not in rep:
7+
rep.append(i)
8+
else:
9+
rep.remove(i)
10+
rep.append(i)
11+
print(len(rep))
12+
for j in rep:
13+
if rep.index(j) == len(rep)-1:
14+
print(j)
15+
else:
16+
print(j, end=' ')

0 commit comments

Comments
 (0)