HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


50808 - Total Distance Traveled

Guest
• Review clarifications (1)

Volume problems

• 50810 - Print Office
• 50952 - Derby Tirana
• 50871 - Harmonic Mean
• 50859 - Low performance
• 50508 - The Biggest Area
• 51077 - Grades Histogram
• 50528 - Rock-Scissors-Paper
• 50744 - The Smallest Perimeter
• 50808 - Total Distance Traveled
• 50814 - Buying Books from Internet
• 50812 - Total Discount for the clients
• 50832 - Rock Paper Scissors Lizard ...
• 51046 - The biggest number
• 50867 - Average of the Best Grades
• Reflektimi i pikes
• 50994 - The Most Crowded Station
• 51194 - The difference between max...

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.

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