• 1
    Input and Output Data
    • Tasks
  • 2
    Conditions
    • Tasks
  • 3
    For Loop
    • Tasks
  • 4
    Strings
    • Tasks
  • 5
    While Loop
    • Tasks
  • 6
    Lists
    • Tasks
  • 7
    Two-Dimensional Arrays
    • Tasks
  • 8
    Dictionaries
    • Tasks
  • 9
    Sets
    • Tasks
  • 10
    Functions and Recursion
    • Tasks
  • к

Lesson 7. Two -dimensional arrays

Difficulty level:

Task«Bus manager»

💻 Python
you & mdash; Bus park dispatcher. You are provided with data on the time of arrival of buses for stops in the form of a two -dimensional list. Each internal list represents the bus route, and the number in it & mdash; The time of arrival at each stop in minutes. It is necessary to calculate the total travel time for each bus, find the minimum, maximum and average time among all buses. Time of arrival at the stop & mdash; This is the time from the date of departure.

Input format

Output format

three numbers separated by spaces: the minimum total travel time, the maximum total travel time, the average total travel time. Trick the results to two signs after a decimalum

Example

Input

[[150, 180, 105], [255, 165], [210, 120, 135], [90, 120, 195, 165]]

Output

105.00 420.00 221.25

Hint

There will be no clue here, decide for yourself!

main.py
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
Test 7
Test 8
Test 9
Test 10
Developer’s solution

🎉 Congratulations! 🎉

You did an excellent job with the task! It was a challenging problem, but you found the correct solution. You are one step closer to mastering programming! Keep up the good work, because every stage you pass makes you even stronger.

AD

Advertisement

red-snake blue-snake green-snake

Running your code...

AI Helper

Hi! I am your programming assistant. Ask me anything about Python — I can explain functions, methods, and help you understand the current task!