ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Unsorted > задача:


50808 - Total Distance Traveled

Гость
• Вопросы к жюри (1)

Задачи раздела

• 50952 - Derby Tirana
• 50443 - Dajte Express
• 50819 - Linked Numbers
• 50519 - Image Filtering
• 50798 - Passing the course
• 50799 - OSHEE Electric Bill
• 50833 - Min of Odd Positions
• 50821 - Derivative of an array
• 50808 - Total Distance Traveled
• 50817 - The Knight Move
• 50537 - esreveR Triangle
• 50402 - Hello World!
• 503013 - DNA
• 50966 - TVSH
• 50970 - Marbles
• 50943 - Word Game
• 51106 - Polar Bear

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

Total Distance Traveled

Your physics professor is having a problem. He wants to see if his odometer is working properly. He has taken notes of traveling speeds and time traveled with that speed.

Question: Calculate and show the total distance traveled.

Input specification
You will be first given the number of input (n) where 0 ≤ n ≤ 5000. Then, in the following n lines, you will be given two integers:

  • The time traveled (in minutes) where the time is between 1 and 400
  • The speed (km per hour): an integer between 0 and 200

Output specification
Show a floating point number with two digits precision.

Sample Input
4
120 80
130 40
35 80
190 60
Sample Output
483.33

Explanation: The car has traveled for (120 minutes) two hours with 80 km per hour (traveled 160 kms). Then for 130 minutes, 40 km per hour, etc.

Time traveledSpeedKms traveled
12080160.0
1304086.667
358046.667
19060190.0
Total distance 483.33



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

www.contester.ru