#AY10001. 找出山峰
找出山峰
[Title Description]
likes to climb mountains because it can bring him a good mood and state. Because also likes to collect and analyze data, he inadvertently recorded the general trend of the height he climbed during a mountain climb:
1 3 4 10 23 20 12 4 2
Obviously, climbed to the peak when climbing to the place with the height of '23'.
Given the number of you recorded, find the subscript of the peak. 😄
[input format]
Enter two lines in total:
First line: enter an integer ;
Line 2: enter integers to represent the number sequence of the title description.
[output format]
The output is only an integer representing the subscript of the peak** The questions ensure that the answers are unique and have answers**
[input / output example]
9
1 3 4 10 23 20 12 4 2
4
[data range]
, each number in the sequence is within the interval of .
[reminder]
This topic is adapted from the topic of the leetcode
main station. The link: the subscript of the mountain range array