結果

問題 No.296 n度寝
ユーザー jonki324jonki324
提出日時 2018-06-06 17:22:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 1,000 ms
コード長 446 bytes
コンパイル時間 1,846 ms
コンパイル使用メモリ 71,108 KB
実行使用メモリ 56,616 KB
最終ジャッジ日時 2023-09-12 22:45:25
合計ジャッジ時間 4,679 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,960 KB
testcase_01 AC 121 ms
56,480 KB
testcase_02 AC 120 ms
55,512 KB
testcase_03 AC 123 ms
55,572 KB
testcase_04 AC 120 ms
56,616 KB
testcase_05 AC 120 ms
56,136 KB
testcase_06 AC 121 ms
55,780 KB
testcase_07 AC 121 ms
55,936 KB
testcase_08 AC 120 ms
55,560 KB
testcase_09 AC 122 ms
55,620 KB
testcase_10 AC 123 ms
56,024 KB
testcase_11 AC 124 ms
56,508 KB
testcase_12 AC 124 ms
55,912 KB
testcase_13 AC 121 ms
55,272 KB
testcase_14 AC 121 ms
55,276 KB
testcase_15 AC 121 ms
56,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int h = scan.nextInt();
        int m = scan.nextInt();
        int t = scan.nextInt();
        int tmp = h * 60 + m + (n - 1) * t;
        m = tmp % 60;
        h = (tmp / 60) % 24;
        System.out.println(h);
        System.out.println(m);
        scan.close();
    }
}
0