結果

問題 No.46 はじめのn歩
ユーザー omuretsu2omuretsu2
提出日時 2016-05-10 01:24:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 2,055 ms
コンパイル使用メモリ 74,972 KB
実行使用メモリ 50,836 KB
最終ジャッジ日時 2024-04-15 15:01:31
合計ジャッジ時間 3,635 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 52 ms
37,124 KB
testcase_02 WA -
testcase_03 AC 51 ms
37,004 KB
testcase_04 AC 53 ms
37,072 KB
testcase_05 AC 53 ms
37,180 KB
testcase_06 WA -
testcase_07 AC 52 ms
36,984 KB
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

class Nwark {
	static public void main(String args[]) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] ab = br.readLine().split(" ");

		int ans = 0;
		int aPlus = 0;

		int a = Integer.parseInt(ab[0]);
		int b = Integer.parseInt(ab[1]);

		for(; aPlus <= b;){
			aPlus = aPlus + a;
			ans++;
		}

		System.out.println(ans);

		}
	}
0