結果

問題 No.296 n度寝
ユーザー yuuki121yuuki121
提出日時 2021-01-06 23:18:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 66 ms / 1,000 ms
コード長 560 bytes
コンパイル時間 3,005 ms
コンパイル使用メモリ 78,084 KB
実行使用メモリ 37,744 KB
最終ジャッジ日時 2024-04-25 02:42:55
合計ジャッジ時間 4,242 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
37,488 KB
testcase_01 AC 63 ms
37,296 KB
testcase_02 AC 64 ms
37,396 KB
testcase_03 AC 63 ms
37,128 KB
testcase_04 AC 64 ms
37,744 KB
testcase_05 AC 64 ms
37,576 KB
testcase_06 AC 64 ms
37,264 KB
testcase_07 AC 64 ms
37,612 KB
testcase_08 AC 62 ms
37,284 KB
testcase_09 AC 61 ms
36,936 KB
testcase_10 AC 63 ms
37,484 KB
testcase_11 AC 66 ms
37,048 KB
testcase_12 AC 63 ms
37,576 KB
testcase_13 AC 65 ms
37,108 KB
testcase_14 AC 66 ms
37,248 KB
testcase_15 AC 65 ms
37,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.stream.Stream;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int[] NHMT = Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();

		int n = NHMT[0];
		int h = NHMT[1];
		int m = NHMT[2];
		int t = NHMT[3];

		System.out.println((h + (m + (n - 1) * t) / 60) % 24);
		System.out.println((m + (n - 1) * t) % 60);

	}
}
0