結果

問題 No.296 n度寝
ユーザー samplelpmas
提出日時 2016-12-20 09:58:25
言語 Java
(openjdk 23)
結果
AC  
実行時間 115 ms / 1,000 ms
コード長 503 bytes
コンパイル時間 1,618 ms
コンパイル使用メモリ 74,760 KB
実行使用メモリ 54,156 KB
最終ジャッジ日時 2024-07-07 02:51:43
合計ジャッジ時間 3,976 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int SLEEP_NUM = sc.nextInt();

        int hour = sc.nextInt();
        int minute = sc.nextInt();

        int TIME_INTERVAL = sc.nextInt();

        minute += (SLEEP_NUM - 1) * TIME_INTERVAL;

        hour += minute / 60;
        hour %= 24;
        minute = minute % 60;

        System.out.println(hour);
        System.out.println(minute);

    }

}
0