結果

問題 No.296 n度寝
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-14 08:04:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 210 ms / 1,000 ms
コード長 464 bytes
コンパイル時間 2,654 ms
コンパイル使用メモリ 71,664 KB
実行使用メモリ 57,228 KB
最終ジャッジ日時 2023-10-11 12:28:47
合計ジャッジ時間 6,645 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 205 ms
56,688 KB
testcase_01 AC 196 ms
56,580 KB
testcase_02 AC 207 ms
56,428 KB
testcase_03 AC 210 ms
56,760 KB
testcase_04 AC 198 ms
56,096 KB
testcase_05 AC 203 ms
56,496 KB
testcase_06 AC 195 ms
56,912 KB
testcase_07 AC 208 ms
56,476 KB
testcase_08 AC 200 ms
57,228 KB
testcase_09 AC 205 ms
56,636 KB
testcase_10 AC 202 ms
56,512 KB
testcase_11 AC 197 ms
56,676 KB
testcase_12 AC 204 ms
56,964 KB
testcase_13 AC 205 ms
56,764 KB
testcase_14 AC 203 ms
56,600 KB
testcase_15 AC 194 ms
56,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int n = sc.nextInt(); int h = sc.nextInt(); int m = sc.nextInt(); int t = sc.nextInt();
		
		Calendar cl = Calendar.getInstance();
		cl.set(Calendar.HOUR_OF_DAY, h);
		cl.set(Calendar.MINUTE, m);
		cl.add(Calendar.MINUTE, (n-1)*t);
		System.out.println(cl.get(Calendar.HOUR_OF_DAY));
		System.out.println(cl.get(Calendar.MINUTE));
		
	}
}
0