結果
問題 | No.70 睡眠の重要性! |
ユーザー | ぴろず |
提出日時 | 2014-12-11 16:07:25 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 128 ms / 5,000 ms |
コード長 | 487 bytes |
コンパイル時間 | 2,064 ms |
コンパイル使用メモリ | 71,448 KB |
実行使用メモリ | 56,120 KB |
最終ジャッジ日時 | 2023-09-02 13:59:55 |
合計ジャッジ時間 | 3,495 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 124 ms
55,404 KB |
testcase_01 | AC | 123 ms
55,668 KB |
testcase_02 | AC | 125 ms
56,120 KB |
testcase_03 | AC | 128 ms
55,996 KB |
testcase_04 | AC | 128 ms
55,660 KB |
testcase_05 | AC | 122 ms
55,980 KB |
ソースコード
package no070; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int sum = 0; for(int i=0;i<n;i++) { int[] time = new int[2]; for(int j=0;j<2;j++) { String[] s = sc.next().split(":"); time[j] = Integer.valueOf(s[0]) * 60 + Integer.valueOf(s[1]); } sum += (24 * 60 + (time[1] - time[0])) % (24 * 60); } System.out.println(sum); } }