結果

問題 No.296 n度寝
ユーザー mitsuomitsuo
提出日時 2016-05-05 11:40:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 171 ms / 1,000 ms
コード長 910 bytes
コンパイル時間 2,228 ms
コンパイル使用メモリ 77,948 KB
実行使用メモリ 59,240 KB
最終ジャッジ日時 2023-09-21 08:24:51
合計ジャッジ時間 5,914 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 167 ms
57,388 KB
testcase_01 AC 169 ms
59,240 KB
testcase_02 AC 168 ms
57,240 KB
testcase_03 AC 167 ms
57,312 KB
testcase_04 AC 167 ms
57,452 KB
testcase_05 AC 168 ms
57,256 KB
testcase_06 AC 169 ms
56,924 KB
testcase_07 AC 169 ms
56,980 KB
testcase_08 AC 171 ms
56,984 KB
testcase_09 AC 171 ms
57,288 KB
testcase_10 AC 171 ms
57,140 KB
testcase_11 AC 171 ms
57,620 KB
testcase_12 AC 170 ms
57,196 KB
testcase_13 AC 168 ms
57,604 KB
testcase_14 AC 169 ms
57,564 KB
testcase_15 AC 168 ms
57,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;

public class Main {

	final static String d = System.getProperty("line.separator");

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		List<String> input = new ArrayList<>();
		while (sc.hasNext()) {
			input.add(sc.nextLine());
		}

		System.out.println(solve(input));

		sc.close();
	}

	public static String solve(List<String> in) {
		Integer N = Integer.valueOf(in.get(0).split(" ")[0]);
		Integer H = Integer.valueOf(in.get(0).split(" ")[1]);
		Integer M = Integer.valueOf(in.get(0).split(" ")[2]);
		Integer T = Integer.valueOf(in.get(0).split(" ")[3]);

		LocalDateTime now = LocalDateTime.of(2016, 1, 1, H, M);
		now = now.plusMinutes((N - 1) * T);

		return now.getHour() + d + now.getMinute();
	}

}
0