結果

問題 No.46 はじめのn歩
ユーザー hidehide
提出日時 2017-06-05 18:06:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 590 bytes
コンパイル時間 2,030 ms
コンパイル使用メモリ 74,268 KB
実行使用メモリ 57,720 KB
最終ジャッジ日時 2023-10-22 05:33:34
合計ジャッジ時間 4,171 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
57,504 KB
testcase_01 AC 134 ms
57,536 KB
testcase_02 AC 133 ms
57,444 KB
testcase_03 AC 134 ms
57,720 KB
testcase_04 AC 135 ms
57,664 KB
testcase_05 AC 129 ms
57,320 KB
testcase_06 AC 134 ms
57,476 KB
testcase_07 AC 134 ms
57,512 KB
testcase_08 AC 130 ms
57,428 KB
testcase_09 AC 133 ms
57,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

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

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
    }
}

0