結果

問題 No.296 n度寝
ユーザー t8m8⛄️t8m8⛄️
提出日時 2016-01-25 17:51:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 754 bytes
コンパイル時間 3,283 ms
コンパイル使用メモリ 72,864 KB
実行使用メモリ 56,736 KB
最終ジャッジ日時 2023-09-21 08:20:53
合計ジャッジ時間 6,163 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
56,736 KB
testcase_01 AC 128 ms
55,992 KB
testcase_02 AC 128 ms
55,764 KB
testcase_03 AC 124 ms
56,136 KB
testcase_04 AC 121 ms
55,788 KB
testcase_05 AC 124 ms
56,440 KB
testcase_06 AC 122 ms
55,492 KB
testcase_07 AC 132 ms
55,812 KB
testcase_08 AC 133 ms
55,804 KB
testcase_09 AC 121 ms
55,444 KB
testcase_10 AC 124 ms
56,396 KB
testcase_11 AC 123 ms
56,052 KB
testcase_12 AC 123 ms
55,500 KB
testcase_13 AC 126 ms
55,744 KB
testcase_14 AC 123 ms
55,920 KB
testcase_15 AC 124 ms
55,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.awt.geom.*;
import java.math.*;

public class No0293 {

	static final Scanner in = new Scanner(System.in);
	static final PrintWriter out = new PrintWriter(System.out,false);

	static void solve() {
		int n = in.nextInt();
		int h = in.nextInt();
		int m = in.nextInt();
		int t = in.nextInt();
		while (n-- > 1) {
			m += t;
			h += m/60;
			m %= 60;
			h %= 24;
		}

		out.println(h);
		out.println(m);
	}

	public static void main(String[] args) {
		long start = System.currentTimeMillis();

		solve();
		out.flush();

		long end = System.currentTimeMillis();
		//trace(end-start + "ms");
		in.close();
		out.close();
	}

	static void trace(Object... o) { System.out.println(Arrays.deepToString(o));}
}
0