結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
57,680 KB
testcase_01 AC 131 ms
57,464 KB
testcase_02 AC 134 ms
57,652 KB
testcase_03 AC 134 ms
57,552 KB
testcase_04 AC 131 ms
57,676 KB
testcase_05 AC 130 ms
57,392 KB
testcase_06 AC 131 ms
57,292 KB
testcase_07 AC 132 ms
57,608 KB
testcase_08 AC 131 ms
57,436 KB
testcase_09 AC 119 ms
56,240 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