結果

問題 No.296 n度寝
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 07:18:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 473 bytes
コンパイル時間 1,786 ms
コンパイル使用メモリ 74,480 KB
実行使用メモリ 54,464 KB
最終ジャッジ日時 2024-05-04 11:17:51
合計ジャッジ時間 4,333 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 111 ms
41,664 KB
testcase_04 AC 107 ms
41,344 KB
testcase_05 AC 109 ms
41,340 KB
testcase_06 AC 114 ms
40,336 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 108 ms
41,380 KB
testcase_10 AC 101 ms
40,352 KB
testcase_11 AC 104 ms
41,468 KB
testcase_12 AC 109 ms
41,560 KB
testcase_13 AC 112 ms
41,484 KB
testcase_14 AC 100 ms
41,488 KB
testcase_15 AC 103 ms
41,708 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++;
        }
        if(H>=24){
            H=H-24;
        }
        System.out.println(H);
        System.out.println(M);
    }
}
0