제출 코드
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.util.*;
import java.io.*;
public class Main
{
public static int changeToNum(String str){
String[] spt = str.split(":");
return Integer.parseInt(spt[0])*60 + Integer.parseInt(spt[1]);
}
public static void main(String args[]) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int result = 0;
for(int i=0; i<5; i++){
String[] str = br.readLine().split(" ");
result += changeToNum(str[1]) - changeToNum(str[0]);
}
System.out.println(result);
}
}