結果

問題 No.46 はじめのn歩
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-07 21:10:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 388 bytes
コンパイル時間 1,988 ms
コンパイル使用メモリ 71,596 KB
実行使用メモリ 56,096 KB
最終ジャッジ日時 2023-09-17 15:58:18
合計ジャッジ時間 4,020 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
56,096 KB
testcase_01 AC 127 ms
55,652 KB
testcase_02 AC 129 ms
56,016 KB
testcase_03 AC 126 ms
55,676 KB
testcase_04 AC 125 ms
56,004 KB
testcase_05 AC 127 ms
55,852 KB
testcase_06 AC 126 ms
55,968 KB
testcase_07 AC 125 ms
55,664 KB
testcase_08 AC 128 ms
55,788 KB
testcase_09 AC 127 ms
56,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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