結果

問題 No.70 睡眠の重要性!
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-20 22:10:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 435 bytes
コンパイル時間 1,977 ms
コンパイル使用メモリ 76,660 KB
実行使用メモリ 54,944 KB
最終ジャッジ日時 2024-05-01 07:58:12
合計ジャッジ時間 3,335 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
47,268 KB
testcase_01 AC 142 ms
42,632 KB
testcase_02 AC 138 ms
42,588 KB
testcase_03 AC 126 ms
42,584 KB
testcase_04 AC 142 ms
42,752 KB
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

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