結果

問題 No.46 はじめのn歩
ユーザー kuramukuramu
提出日時 2016-01-19 15:55:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 605 bytes
コンパイル時間 2,127 ms
コンパイル使用メモリ 74,552 KB
実行使用メモリ 53,592 KB
最終ジャッジ日時 2023-10-21 06:51:40
合計ジャッジ時間 3,248 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
53,576 KB
testcase_01 AC 57 ms
53,584 KB
testcase_02 AC 55 ms
52,572 KB
testcase_03 AC 56 ms
53,580 KB
testcase_04 AC 56 ms
52,560 KB
testcase_05 AC 58 ms
53,576 KB
testcase_06 AC 57 ms
53,592 KB
testcase_07 AC 57 ms
52,524 KB
testcase_08 AC 57 ms
52,528 KB
testcase_09 AC 56 ms
53,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {

	public static void main(String[] args) {
		BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		try {
			String[] temp = stdReader.readLine().split(" ");
			int a = Integer.parseInt(temp[0]);
			int b = Integer.parseInt(temp[1]);
			if(b%a==0){
				out.println(b/a);
			}else{
				out.println((b/a+1));
			}
			out.flush();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0