結果

問題 No.46 はじめのn歩
ユーザー barrett114514barrett114514
提出日時 2017-07-20 19:59:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 285 bytes
コンパイル時間 3,834 ms
コンパイル使用メモリ 77,508 KB
実行使用メモリ 41,488 KB
最終ジャッジ日時 2024-04-17 05:56:41
合計ジャッジ時間 5,154 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,100 KB
testcase_01 AC 130 ms
41,360 KB
testcase_02 AC 130 ms
41,324 KB
testcase_03 AC 131 ms
40,860 KB
testcase_04 AC 127 ms
41,124 KB
testcase_05 AC 125 ms
41,364 KB
testcase_06 AC 127 ms
41,140 KB
testcase_07 AC 113 ms
41,488 KB
testcase_08 AC 112 ms
41,364 KB
testcase_09 AC 128 ms
41,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class StepToN {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		if(b % a == 0){
			System.out.println( b / a );
		}else{
			System.out.println( b / a + 1 );
		}
	}

}
0