結果

問題 No.70 睡眠の重要性!
ユーザー ohagi_1182
提出日時 2017-10-20 22:10:07
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 435 bytes
コンパイル時間 2,607 ms
コンパイル使用メモリ 76,980 KB
実行使用メモリ 55,224 KB
最終ジャッジ日時 2024-11-21 10:50:05
合計ジャッジ時間 4,312 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ans = 0;
		for(int i = 0 ; i < n ; i++) {
			String[] time = (sc.next() + ":" + sc.next()).split(":");
			ans += ((Integer.valueOf(time[2]) + 24 -Integer.valueOf(time[0])) % 24) * 60 + Integer.valueOf(time[3]) - Integer.valueOf(time[1]);
		}
		System.out.println(ans);
 	}
}

0