結果

問題 No.296 n度寝
ユーザー springspring
提出日時 2019-06-12 17:53:21
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 2,268 ms
コンパイル使用メモリ 73,780 KB
実行使用メモリ 41,524 KB
最終ジャッジ日時 2024-04-19 09:09:45
合計ジャッジ時間 4,777 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 120 ms
40,744 KB
testcase_04 AC 126 ms
41,524 KB
testcase_05 WA -
testcase_06 AC 128 ms
41,052 KB
testcase_07 AC 128 ms
41,208 KB
testcase_08 WA -
testcase_09 AC 126 ms
41,432 KB
testcase_10 AC 128 ms
41,396 KB
testcase_11 AC 124 ms
41,520 KB
testcase_12 WA -
testcase_13 AC 114 ms
41,224 KB
testcase_14 AC 124 ms
40,944 KB
testcase_15 AC 105 ms
40,092 KB
権限があれば一括ダウンロードができます

ソースコード

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