結果

問題 No.296 n度寝
ユーザー yagi2yagi2
提出日時 2017-04-20 15:29:34
言語 Java19
(openjdk 21)
結果
AC  
実行時間 120 ms / 1,000 ms
コード長 450 bytes
コンパイル時間 2,089 ms
コンパイル使用メモリ 72,112 KB
実行使用メモリ 56,420 KB
最終ジャッジ日時 2023-09-27 03:34:38
合計ジャッジ時間 5,239 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
54,304 KB
testcase_01 AC 115 ms
55,836 KB
testcase_02 AC 115 ms
55,872 KB
testcase_03 AC 115 ms
55,732 KB
testcase_04 AC 116 ms
55,836 KB
testcase_05 AC 115 ms
55,756 KB
testcase_06 AC 119 ms
55,808 KB
testcase_07 AC 117 ms
56,076 KB
testcase_08 AC 118 ms
56,092 KB
testcase_09 AC 116 ms
55,980 KB
testcase_10 AC 115 ms
56,140 KB
testcase_11 AC 120 ms
55,752 KB
testcase_12 AC 117 ms
56,420 KB
testcase_13 AC 115 ms
55,896 KB
testcase_14 AC 117 ms
56,012 KB
testcase_15 AC 116 ms
56,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long N = Long.parseLong(sc.next()) - 1;
        int H = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());
        int T = Integer.parseInt(sc.next());

        M += T * N;
        H += M / 60;
        M %= 60;
        H %= 24;

        System.out.printf("%d\n%d", H, M);

    }
}
0