racers have competed in a Formula 1 racing tournament. Given the amount of time taken by each driver to complete the race, write a program that identifies the number of the racer who won the bronze medal (i.e. stood third in the race). Assume, the racers are numbered from 1 to n.
Just in case you don’t know how races work, the racer that takes the least amount of time to finish gets the gold medal, the racer that finished second takes the silver medal, and the racer that took the third-lowest time to finish wins the third prize.
The input contains two lines, the first of which contains , the number of competing racers. The second line contains space-separated integer values, the of which denotes , the number of seconds taken by the racer numbered to complete the race. You can assume that there were no ties, that is, each racer took a different amount of time to finish.
Output a single integer, the number of the racer who won the bronze medal.
4 1 5 4 3
Here, racer 1 takes 1 second to finish the race, racer 2 takes 5 seconds and the racers numbered 3 and 4 take 4 and 3 seconds respectively.
Image Source: imgflip