結果

問題 No.296 n度寝
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-13 22:30:16
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 471 bytes
コンパイル時間 2,309 ms
コンパイル使用メモリ 73,728 KB
実行使用メモリ 41,464 KB
最終ジャッジ日時 2024-04-28 17:35:30
合計ジャッジ時間 5,100 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 135 ms
41,228 KB
testcase_03 AC 128 ms
41,276 KB
testcase_04 AC 131 ms
41,200 KB
testcase_05 AC 131 ms
41,304 KB
testcase_06 AC 137 ms
41,448 KB
testcase_07 WA -
testcase_08 AC 136 ms
41,240 KB
testcase_09 AC 130 ms
41,368 KB
testcase_10 AC 130 ms
40,928 KB
testcase_11 AC 130 ms
41,300 KB
testcase_12 AC 133 ms
41,056 KB
testcase_13 AC 129 ms
41,420 KB
testcase_14 AC 130 ms
41,280 KB
testcase_15 AC 133 ms
41,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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 t =sc.nextInt();
		int ans1 = 0; int ans2 = 0;
		int x = h * 60 * 60 + m * 60;
		for(int i = 0 ; i < n - 1 ; i++) {
			x += t * 60;
		}
		x %= 3600 * 24;
		ans1 = x / 3600;
		ans2 = (x - ans1 * 3600) / 60;
		System.out.println(ans1);
		System.out.println(ans2);
	}
}
0