Fashion Elements
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
In the given array of integers, your task is to output only the elements that appear more than once. Numbers that appear only once should not be included, and among the repeating elements, you should select the one with the smallest index. If no such elements exist, output the message NO.
Input Data
The first line contains the integer N, representing the number of elements in the array. The second line contains N integers, each with an absolute value not exceeding 100.
Output Data
Print the repeating elements of the array in a single line, separated by spaces.
Examples
Input #1
Answer #1
Input #4
Answer #4
Submissions 4K
Acceptance rate 37%