結果

問題 No.46 はじめのn歩
ユーザー ya-hurusanya-hurusan
提出日時 2020-01-25 23:58:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 375 bytes
コンパイル時間 3,380 ms
コンパイル使用メモリ 72,028 KB
実行使用メモリ 55,904 KB
最終ジャッジ日時 2023-10-12 04:47:42
合計ジャッジ時間 5,561 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
53,532 KB
testcase_01 AC 129 ms
55,608 KB
testcase_02 AC 129 ms
55,696 KB
testcase_03 AC 126 ms
55,460 KB
testcase_04 AC 129 ms
55,672 KB
testcase_05 AC 128 ms
55,704 KB
testcase_06 AC 128 ms
55,768 KB
testcase_07 AC 128 ms
55,308 KB
testcase_08 AC 128 ms
55,864 KB
testcase_09 AC 130 ms
55,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package answer;

import java.util.Scanner;

public class No_46 {

	public static void main(String[] args) {

		// 入力値定義
		Scanner input = new Scanner(System.in);
		int step = input.nextInt();
		int distance = input.nextInt();

		// 処理部
		int cal = (distance / step );

		if((cal * step) < distance){
			cal = (cal + 1);
		}

		System.out.println(cal);

	}

}
0