HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50751 - The biggest Minute

Guest
• Review clarifications (2)

Volume problems

• 50444 - n digit kth number divisible...
• 50865 - Apartment Building Adminis...
• 50531 - File Decryption
• 50525 - Ordering Pizza
• 50451 - Processing Cost
• 50470 - Close Pairs - Revised
• 50752 - Student Groups
• 50524 - Elevator
• 50751 - The biggest Minute
• 50468 - Draw Matrix - 2
• 50998 - CEN112 Homework, quiz av...
• 50804 - Marathon
• 50835 - Club Presidency
• 50526 - Gold Market
• 50872 - Top M Grades
• 50868 - Sort Frequencies
• 50405 - Accounts Receivable

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