HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Sorting and sequences > problem:


50751 - The biggest Minute

Guest
• Review clarifications (2)

Section problems

• 51002 - The most successful classes
• 50743 - Total Scholarships Discount
• 50847 - The first m trains to leave
• 50984 - Top m hardworking employees
• 50740 - Service Time - 1
• 50750 - Service Time - 2
• 50752 - Student Groups
• 50754 - Team Standings
• 50751 - The biggest Minute
• 50998 - CEN112 Homework, quiz av...
• 50804 - Marathon
• 50835 - Club Presidency
• 50747 - Safe boxes against thieves
• 50742 - King Arthur II
• 50352 - Selling Cows
• 50872 - Top M Grades
• 50868 - Sort Frequencies

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

The biggest Minute

Eurasia marathon is run every year in Istanbul. And many athletes run for the medals from one continent to another. Their running times are recorded in seconds. This year, there is a special sponsor for the competition: Big watches co. clock company. They want to give a special prize for the runner whose running time has the biggest minute.

  • One Hour is 60 minutes
  • One minute is 60 seconds

Question: You will be given n time information in seconds. Write a program that converts these time information into hours, minutes and seconds. Then, your program finds the winner for this special prize.

Input specification:
The first line contains an integer number (N) where 0 ≤ N ≤ 2000. Each of the following N lines will contain an integer number which is between 0 and 20000.

Output specification:
You will show one integer number which is the order of the athlete who has the biggest minute. Assume that order of athletes start from 1. Note: If there are several athletes having the same max minutes, show the one with the least hours. If there are several athletes with the same hours and minutes then show them in ascending order according to their order given in the input.

Sample Input 1 Sample Output 1
4
3626
749
1780
8674
3

Explanation:

  1. 3626 seconds is 1 Hour, 0 minute and 26 seconds
  2. 749 seconds is 0 Hour, 12 minutes and 29 seconds
  3. 1780 seconds is 0 Hour, 29 minutes and 40 seconds
  4. 8674 seconds is 2 Hours, 24 minutes and 34 seconds
So, the third athlete has 29 minutes.

Для отправки решений необходимо выполнить вход.

www.contester.ru