結果

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

ソースコード

diff #

import java.util.Scanner;

public class Main {
	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();
		sc.close();
		int sleepMin = (N-1)*T;
		int minutes = (M+sleepMin)%60;
		int sleepHour = ((M+sleepMin)/60);
		H = (H+sleepHour)%24;
		System.out.println(H);
		System.out.println(minutes);
	}// mainmethod

} // class
0