#K1301. Highest Donation Month

    ID: 23817 Type: Default 1000ms 256MiB

Highest Donation Month

Highest Donation Month

You are given the donation amounts received over several months. Your task is to determine the month (using 1-indexing) with the highest donation. In the case of multiple months having the same highest donation, the earliest month should be selected.

The solution requires reading the donation data from standard input. The first line of the input contains an integer n, representing the number of months. The second line contains n space-separated integers where each integer represents the donation amount for that month.

The output should be a single integer representing the 1-indexed month with the highest donation.

Mathematically, if the donation amounts are represented as an array (D = [d_1, d_2, \dots, d_n]), then you need to find the smallest index (i) such that (d_i = \max{d_1, d_2, \dots, d_n}).

inputFormat

Input is given via standard input. The first line contains an integer (n) representing the number of months. The second line contains (n) space-separated integers, where each integer is the donation amount for the corresponding month.

outputFormat

Output a single integer to standard output which is the 1-indexed position of the month with the highest donation. In case of ties, the earliest month is chosen.## sample

1
120
1