Write the shortest code that can sum all the time durations that appear in the stdin. The program must only consider the strings that match with one of the following patterns and ignore the rest.
HH:MM:SS (it will be interpreted as HH hours, MM minutes and SS seconds) H:MM:SS (it will be interpreted as H hours, MM minutes and SS seconds) MM:SS (it will be interpreted as MM minutes, SS seconds) M:SS (it will be interpreted as M minutes, SS seconds)
examples of strings that match with the enumerated patterns:
12:00:01 2:03:22 00:53 9:13
The output should be of the form
HHh MMm SSs (that means HH hours, MM minutes and SS seconds with non-zero-padding)
View the Welcome video.
Video: 10:37 min.
View the video introduction to the course.
Video: 3:30 min. View the video of how to use the Lesson Overview.
Video: 9:13 min.
View the video overview of how to use the Epsilen system to share your work.
Video: 03:15 min.
View the video to learn about the State of Texas Assessment of Academic Readiness (STAAR).
Video: 1:05:26 min.
1h 32m 1s