結果

問題 No.296 n度寝
ユーザー Daigo HIROOKADaigo HIROOKA
提出日時 2018-05-15 01:25:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 541 bytes
コンパイル時間 3,600 ms
コンパイル使用メモリ 73,156 KB
実行使用メモリ 56,556 KB
最終ジャッジ日時 2023-09-10 20:55:01
合計ジャッジ時間 6,640 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,216 KB
testcase_01 AC 125 ms
55,884 KB
testcase_02 AC 125 ms
55,844 KB
testcase_03 AC 123 ms
55,868 KB
testcase_04 AC 124 ms
55,768 KB
testcase_05 AC 124 ms
56,056 KB
testcase_06 AC 122 ms
55,904 KB
testcase_07 AC 123 ms
55,660 KB
testcase_08 AC 123 ms
56,108 KB
testcase_09 AC 122 ms
55,992 KB
testcase_10 AC 124 ms
56,400 KB
testcase_11 AC 125 ms
56,024 KB
testcase_12 AC 124 ms
56,040 KB
testcase_13 AC 123 ms
56,400 KB
testcase_14 AC 122 ms
56,556 KB
testcase_15 AC 122 ms
55,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class NTimesSleep{
    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();

        int sleep_time = T*(N-1);
        int min = M + sleep_time;
        int h_wake = (H+min/60)%24;
        int m_wake = min%60;

        System.out.println(h_wake);
        System.out.println(m_wake);
    }
}
0