結果

問題 No.296 n度寝
ユーザー garaisigaraisi
提出日時 2017-01-01 15:08:23
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 667 bytes
コンパイル時間 3,682 ms
コンパイル使用メモリ 71,740 KB
実行使用メモリ 59,356 KB
最終ジャッジ日時 2023-08-22 09:12:58
合計ジャッジ時間 6,424 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 203 ms
56,400 KB
testcase_02 AC 191 ms
56,364 KB
testcase_03 AC 190 ms
56,552 KB
testcase_04 AC 203 ms
56,528 KB
testcase_05 AC 202 ms
56,672 KB
testcase_06 AC 197 ms
56,516 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 191 ms
57,720 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 204 ms
56,736 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 203 ms
56,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;

public class Main {
	public static void main(String args[]){
		Scanner input = new Scanner(System.in);

		int sleeptimes = input.nextInt();
		int hour = input.nextInt();
		int minute = input.nextInt();
		int interval = input.nextInt();

		minute += interval * (sleeptimes-1);

		Calendar c = Calendar.getInstance();
		c.set(Calendar.HOUR, hour);
		c.set(Calendar.MINUTE,minute);

		Date waketime = c.getTime();

		c.setTime(waketime);

		int wakehour = c.get(Calendar.HOUR);
		int wakeminute = c.get(Calendar.MINUTE);

		System.out.println(wakehour);
		System.out.println(wakeminute);
	}
}
0