The site with the largest number of test questions for Huawei OD machines, JAVA & Python & C & C++ & GO & JavaScript
topic
The park area provides small trains for one-way traffic. From the smallest station number to the largest station number in the park, the
number of passages is as high as 1~2~3~4~1
10,000 , and then it is used for employees to shuttle in various office parks.
Through the survey and statistics of N
each , the bus interval of each employee, including the front and rear stations,
please Design a program to calculate which park station the train has the most people at.
enter
The 1
inputted line is the number of surveyed employees,
and the beginning of 2
the line
is the starting pick-up station and drop-off station of each employee.
Use numbers to replace each park with a space, split such as 3 5
means to 3
on the bus from the No. 1 park and get off
at the 5
No. 1 park
output
The park site number when the number of people is the largest, and return the park site with the smallest number when the maximum number of people is the same
example one
enter
3
1 3
2 4
1 4
output
2
illustrate
1
line