結果

問題 No.46 はじめのn歩
ユーザー koukonkokoukonko
提出日時 2015-12-07 16:36:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 806 ms / 5,000 ms
コード長 581 bytes
コンパイル時間 2,010 ms
コンパイル使用メモリ 71,464 KB
実行使用メモリ 50,588 KB
最終ジャッジ日時 2023-10-12 20:00:13
合計ジャッジ時間 3,986 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,260 KB
testcase_01 AC 44 ms
49,280 KB
testcase_02 AC 45 ms
49,368 KB
testcase_03 AC 44 ms
49,584 KB
testcase_04 AC 44 ms
49,452 KB
testcase_05 AC 45 ms
49,484 KB
testcase_06 AC 46 ms
49,728 KB
testcase_07 AC 45 ms
49,268 KB
testcase_08 AC 806 ms
50,588 KB
testcase_09 AC 43 ms
49,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

		try {
			String[] box = buff.readLine().split(" ");
			int[] num = new int[2];
			for(int i = 0; i < 2; ++i){
				num[i] = Integer.parseInt(box[i]);
			}
			int ans = 0;
			while(num[0] < num[1]){
				num[1] -= num[0];
				++ans;
			}

			System.out.println(++ans);

		} catch (NumberFormatException e) {

		} catch (IOException e) {

		}
	}
}
0