結果

問題 No.296 n度寝
ユーザー jimanojimano
提出日時 2018-01-20 15:59:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 46 ms / 1,000 ms
コード長 697 bytes
コンパイル時間 3,120 ms
コンパイル使用メモリ 71,712 KB
実行使用メモリ 50,012 KB
最終ジャッジ日時 2023-08-26 09:02:33
合計ジャッジ時間 4,937 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
50,000 KB
testcase_01 AC 45 ms
49,728 KB
testcase_02 AC 45 ms
49,496 KB
testcase_03 AC 45 ms
49,752 KB
testcase_04 AC 45 ms
49,732 KB
testcase_05 AC 45 ms
49,728 KB
testcase_06 AC 45 ms
49,452 KB
testcase_07 AC 45 ms
49,588 KB
testcase_08 AC 44 ms
49,444 KB
testcase_09 AC 44 ms
49,748 KB
testcase_10 AC 45 ms
50,012 KB
testcase_11 AC 45 ms
49,528 KB
testcase_12 AC 45 ms
49,708 KB
testcase_13 AC 46 ms
49,664 KB
testcase_14 AC 46 ms
49,620 KB
testcase_15 AC 45 ms
49,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.time.LocalTime;


public class No0296 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
			String[] str = br.readLine().split(" ");
			int n = Integer.parseInt(str[0]);
			int h = Integer.parseInt(str[1]);
			int m = Integer.parseInt(str[2]);
			int t = Integer.parseInt(str[3]);

			LocalTime time = LocalTime.of(h, m).plusMinutes((n - 1) * t);

			System.out.println(time.getHour());
			System.out.println(time.getMinute());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0