Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
Given a sequence of n positive integers, output the numbers in the given order provided that the values occur more than once, then output only the first occurrence of it.
Input
- The first line is an integer n (n ≤ ~10^{4}~).
- The second line is n positive integers representing the values in the given sequence.
Output
- A single line contains the the first occurrence of each value.
Sample Input:
5
1 2 3 3 2
Sample Output:
1 2 3
Bình luận