結果

問題 No.70 睡眠の重要性!
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 22:24:09
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 568 bytes
コンパイル時間 1,992 ms
コンパイル使用メモリ 72,300 KB
実行使用メモリ 56,348 KB
最終ジャッジ日時 2023-08-17 04:26:00
合計ジャッジ時間 3,541 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int total =0;
        for(int i=0; i<N; i++){
            int H = sc.nextInt();
            int M = sc.nextInt();
            int h = sc.nextInt();
            int m = sc.nextInt();
            int temp = h-H;
            if(temp<0){
                temp = temp +24;
            }
            int z = temp*60+(m-M);
            total = total + z;
        }
        System.out.println(total);
    }
}
0