結果

問題 No.296 n度寝
ユーザー Daigo HIROOKA
提出日時 2018-05-15 01:25:18
言語 Java
(openjdk 23)
結果
AC  
実行時間 144 ms / 1,000 ms
コード長 541 bytes
コンパイル時間 3,778 ms
コンパイル使用メモリ 74,128 KB
実行使用メモリ 41,348 KB
最終ジャッジ日時 2024-06-28 12:00:52
合計ジャッジ時間 6,456 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

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