結果

問題 No.296 n度寝
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 07:18:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 473 bytes
コンパイル時間 1,913 ms
コンパイル使用メモリ 71,428 KB
実行使用メモリ 57,876 KB
最終ジャッジ日時 2023-08-17 04:11:14
合計ジャッジ時間 5,025 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 120 ms
55,580 KB
testcase_04 AC 127 ms
56,024 KB
testcase_05 AC 124 ms
55,728 KB
testcase_06 AC 122 ms
55,944 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 123 ms
55,860 KB
testcase_10 AC 126 ms
55,912 KB
testcase_11 AC 123 ms
55,668 KB
testcase_12 AC 124 ms
54,036 KB
testcase_13 AC 123 ms
55,656 KB
testcase_14 AC 122 ms
56,068 KB
testcase_15 AC 123 ms
55,820 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