Duplicate Number(NOIOPJENGLISH19)

Duplicate Number

https://acs.jxnu.edu.cn/problem/NOIOPJENGLISH19

1000ms 65536K

描述:

Given a sequence of N numbers, find a number A that the count of A in the sequence is at least two.

给出一列有n个数,找到数字a,a的数量在序列里倒数第二

输入:

First line: one positive integer N (N <= 1000).
Second line: N positive integers (<= 1000000).

第一行:一个正整数表示n

第二行:n个正整数

输出:

One integer A.

一个数表示a

样例输入:

8
2 4 2 1 5 3 9 6

样例输出:

2
上一篇:输入日期,获得该日期往后一个月同一天,连续获得多个月


下一篇:MyBatis之数据库默认值问题