题目描述
Problem Description
Taro has made it a routine to visit 3 stores every day. He leaves home, visits the 3 stores in a fixed order, and then returns home. Occasionally, he uses a stopwatch to measure how many seconds it takes to travel each segment and records those times.
Given the measurement results for a certain day, create a program to determine the total travel time for that day in minutes and seconds.
Input Format
The input consists of 4 lines, each containing a positive integer.
The integer on the first line represents the travel time in seconds from home to the first store.
The integer on the second line represents the travel time in seconds from the first store to the second store.
The integer on the third line represents the travel time in seconds from the second store to the third store.
The integer on the fourth line represents the travel time in seconds from the third store to home. It is guaranteed that the total travel time in the given input data will be between 1 minute 0 seconds and 59 minutes 59 seconds.
Output Format
The output consists of 2 lines. For \( x \) minutes \( y \) seconds (\( 1 \leq x \leq 59 \), \( 0 \leq y \leq 59 \)), print \( x \) on the first line and \( y \) on the second line.
Sample Input and Output
Sample Input #1
31
34
7
151
Sample Output #1
3
43
Sample Input #2
316
430
643
1253
Sample Output #2
44
2
Sample Input #3
5
10
15
30
Sample Output #3
1
0
Notes/Hints
Sample Explanation 1
In Sample Input/Output #1, the total time is \( 31 + 34 + 7 + 151 = 223 \) seconds, which is 3 minutes 43 seconds. In Sample Input/Output #2, the total time is \( 2642 \) seconds, which is 44 minutes 2 seconds. In Sample Input/Output #3, the total time is \( 60 \) seconds, which is 1 minute 0 seconds.
Sample Explanation 2
- - - - - -
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分