結果

問題 No.296 n度寝
ユーザー jonki324
提出日時 2018-06-06 17:22:49
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 1,000 ms
コード長 446 bytes
コンパイル時間 2,141 ms
コンパイル使用メモリ 74,708 KB
実行使用メモリ 41,544 KB
最終ジャッジ日時 2024-06-30 10:16:31
合計ジャッジ時間 4,871 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

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