結果

問題 No.296 n度寝
ユーザー kou6839kou6839
提出日時 2015-11-09 14:24:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 373 bytes
コンパイル時間 2,729 ms
コンパイル使用メモリ 72,592 KB
実行使用メモリ 56,196 KB
最終ジャッジ日時 2023-09-21 03:48:01
合計ジャッジ時間 5,228 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,700 KB
testcase_01 AC 125 ms
55,752 KB
testcase_02 AC 124 ms
55,940 KB
testcase_03 AC 126 ms
55,928 KB
testcase_04 AC 124 ms
55,948 KB
testcase_05 AC 125 ms
55,832 KB
testcase_06 AC 127 ms
55,796 KB
testcase_07 AC 127 ms
55,608 KB
testcase_08 AC 127 ms
55,508 KB
testcase_09 AC 127 ms
55,632 KB
testcase_10 AC 126 ms
56,196 KB
testcase_11 AC 126 ms
54,140 KB
testcase_12 AC 125 ms
55,756 KB
testcase_13 AC 126 ms
55,584 KB
testcase_14 AC 125 ms
55,912 KB
testcase_15 AC 127 ms
55,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.util.*;

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 r = sc.nextInt();
		
		int ans_h = h;
		int ans_m = m+(n-1)*r;
		ans_h += (ans_m/60);
		ans_m %= 60;
		System.out.println(ans_h%24);
		System.out.println(ans_m);
	}
}

0