結果

問題 No.388 階段 (1)
ユーザー GchansanjouGchansanjou
提出日時 2018-02-10 01:18:41
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 753 bytes
コンパイル時間 2,839 ms
コンパイル使用メモリ 74,696 KB
実行使用メモリ 50,832 KB
最終ジャッジ日時 2024-04-17 15:14:46
合計ジャッジ時間 4,119 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 44 ms
50,040 KB
testcase_02 AC 45 ms
50,340 KB
testcase_03 AC 46 ms
50,220 KB
testcase_04 WA -
testcase_05 AC 44 ms
50,036 KB
testcase_06 AC 43 ms
50,192 KB
testcase_07 AC 44 ms
50,004 KB
testcase_08 AC 43 ms
49,916 KB
testcase_09 AC 42 ms
50,328 KB
testcase_10 WA -
testcase_11 AC 46 ms
50,260 KB
testcase_12 AC 49 ms
50,388 KB
testcase_13 AC 46 ms
50,252 KB
testcase_14 AC 45 ms
50,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukiCoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No00388 {

	public static void main(String[] args) {
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

		try {
			String[] input = new String[2];
			input = bufferedReader.readLine().split(" ");
			int stepCount = Integer.parseInt(input[0]);
			Integer houseHight = Integer.parseInt(input[1]);

			if (stepCount == 0) {
				System.out.println("1");
				return;
			} else {
				int count = 0;
				count = (int) (stepCount/houseHight);
				if(stepCount%houseHight != 0) {
					count++;
				}
				System.out.println(count);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
0