| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 72 | 35 | 30 | 45.455% |
Mart takes a walk every day and his sports watch registers the duration and speed of each segment of uniform movement of his walk. After the walk, Mart can download a log file to his computer. Find the total distance and the average speed of the walk based on this file.
The first line of input contains an integer $N$ (1ドル ≤ N ≤ 10,000円$) and each of the subsequent $N$ lines contains the following (space-separated) data about one segment:
m$S$s, where $M$ is the integer number of minutes (and the minutes part is omitted for times less than a minute) and $S$ is the integer number of seconds (which never exceeds 59);kiirusega;m$S$s/km, where $M$ is the integer number of minutes and $S$ is the integer number of seconds (which never exceeds 59ドル$), and you may assume Mart needs at least a minute, but less than an hour, per kilometre.You may also assume that the total of the durations of all segments does not exceed 24ドル$ hours.
The output should contain two lines
m, where $L$ is the integer number of metres;km/h, where $V$ is a real number; the output value must not differ from the correct answer by more than 0ドル.001$.3 8m30s kiirusega 9m10s/km 4m10s kiirusega 8m1s/km 21s kiirusega 4m10s/km
1531m 7.057km/h