結果
| 問題 | No.70 睡眠の重要性! | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2014-11-20 10:50:13 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                WA
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 600 bytes | 
| コンパイル時間 | 3,290 ms | 
| コンパイル使用メモリ | 77,664 KB | 
| 実行使用メモリ | 41,676 KB | 
| 最終ジャッジ日時 | 2025-01-02 19:23:42 | 
| 合計ジャッジ時間 | 4,586 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 5 WA * 1 | 
ソースコード
import java.util.Scanner;
public class Yukicoder70 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s;
		String[] buf, buf2;
		int h1, m1, h2, m2;
		int sum = 0;
		for (int i = 0; i < n; i++) {
			buf = sc.next().split(":");
			h1 = Integer.parseInt(buf[0]);
			m1 = Integer.parseInt(buf[1]);
			buf = sc.next().split(":");
			h2 = Integer.parseInt(buf[0]);
			m2 = Integer.parseInt(buf[1]);
			sum += h1 > h2 ? (h2 - h1 + 24) * 60 : (h2 - h1) * 60;
			sum += m2 - m1;
		}
		System.out.println(sum);
	}
}
            
            
            
        