結果

問題 No.296 n度寝
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 07:19:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 1,000 ms
コード長 476 bytes
コンパイル時間 2,037 ms
コンパイル使用メモリ 71,320 KB
実行使用メモリ 57,948 KB
最終ジャッジ日時 2023-09-21 08:30:52
合計ジャッジ時間 5,082 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
55,728 KB
testcase_01 AC 134 ms
55,560 KB
testcase_02 AC 126 ms
55,548 KB
testcase_03 AC 125 ms
56,208 KB
testcase_04 AC 125 ms
56,624 KB
testcase_05 AC 124 ms
56,136 KB
testcase_06 AC 126 ms
55,760 KB
testcase_07 AC 140 ms
55,780 KB
testcase_08 AC 126 ms
56,148 KB
testcase_09 AC 125 ms
55,832 KB
testcase_10 AC 129 ms
55,816 KB
testcase_11 AC 128 ms
55,836 KB
testcase_12 AC 131 ms
57,948 KB
testcase_13 AC 132 ms
55,736 KB
testcase_14 AC 126 ms
56,124 KB
testcase_15 AC 129 ms
55,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int H = sc.nextInt();
        int M = sc.nextInt();
        int T = sc.nextInt();
        
        M = M + (N-1)*T;
        while(M>=60){
            M=M-60;
            H++;
        }
        while(H>=24){
            H=H-24;
        }
        System.out.println(H);
        System.out.println(M);
    }
}
0