結果

問題 No.296 n度寝
ユーザー spring
提出日時 2019-06-12 17:53:21
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 2,135 ms
コンパイル使用メモリ 74,068 KB
実行使用メモリ 41,720 KB
最終ジャッジ日時 2024-10-11 01:43:07
合計ジャッジ時間 5,245 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 6
権限があれば一括ダウンロードができます

ソースコード

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;
		M = (M+sleepMin)%60;
		int sleepHour = ((M+sleepMin)/60);
		H = (H+sleepHour)%24;
		System.out.println(H);
		System.out.println(M);

	}// mainmethod

} // class
0