結果

問題 No.296 n度寝
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-10 15:18:02
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 2,477 ms
コンパイル使用メモリ 78,104 KB
実行使用メモリ 41,544 KB
最終ジャッジ日時 2024-04-21 14:23:41
合計ジャッジ時間 4,989 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
41,192 KB
testcase_01 AC 127 ms
41,436 KB
testcase_02 AC 129 ms
41,504 KB
testcase_03 AC 128 ms
41,216 KB
testcase_04 AC 131 ms
41,220 KB
testcase_05 AC 131 ms
41,236 KB
testcase_06 AC 130 ms
41,080 KB
testcase_07 AC 127 ms
41,228 KB
testcase_08 AC 114 ms
40,024 KB
testcase_09 WA -
testcase_10 AC 129 ms
41,108 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 130 ms
41,260 KB
testcase_14 AC 126 ms
41,320 KB
testcase_15 AC 129 ms
41,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public 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();
		
		int time = (n-1)*t;
		h += time/60;
		m += time%60;
		if (m==60) {h++; m=0;}
		System.out.println(h%24);
		System.out.println(m);
	}
}
0