#abc275a. A - Find Takahashi

A - Find Takahashi

Score : 100100 points

问题描述

在 AtCoder 村庄中有 NN 座桥。编号为 ii 的桥的高度为 HiH_i(其中 ii 是一个整数,取值范围在 11NN 之间)。

村庄中任意两座不同的桥具有不同的高度。

请输出表示村庄中最高桥梁的数字。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

There are NN bridges in AtCoder Village. The height of the bridge numbered ii is HiH_i (ii is an integer between 11 and NN).
Every two different bridges in the village have different heights.

Print the number representing the highest bridge in the village.

Constraints

  • 1N1001\leq N \leq 100
  • 1Hi1091\leq H_i \leq 10^9
  • All HiH_i are different.
  • All values in the input are integers.

Input

The input is given from Standard Input in the following format:

NN

H1H_1 H2H_2 \ldots HNH_N

Output

Print the integer representing the highest bridge in AtCoder village.

Sample Input 1

3
50 80 70

Sample Output 1

2

The village has three bridges.
The first, second, and third bridges have heights of 5050, 8080, and 7070, respectively, so the second bridge is the highest.
Thus, 22 should be printed.

Sample Input 2

1
1000000000

Sample Output 2

1

The village has only one bridge, so the first bridge is the highest.

Sample Input 3

10
22 75 26 45 72 81 47 29 97 2

Sample Output 3

9

The village has ten bridges, and the ninth bridge (with a height of 9797) is the highest.

update @ 2024/3/10 11:34:29