結果

問題 No.46 はじめのn歩
ユーザー S1hoS1ho
提出日時 2017-02-19 10:54:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 5,000 ms
コード長 415 bytes
コンパイル時間 3,360 ms
コンパイル使用メモリ 72,488 KB
実行使用メモリ 56,476 KB
最終ジャッジ日時 2023-08-28 18:59:34
合計ジャッジ時間 5,549 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
56,416 KB
testcase_01 AC 117 ms
56,476 KB
testcase_02 AC 117 ms
56,440 KB
testcase_03 AC 117 ms
55,808 KB
testcase_04 AC 117 ms
56,096 KB
testcase_05 AC 117 ms
55,828 KB
testcase_06 AC 117 ms
56,356 KB
testcase_07 AC 117 ms
56,092 KB
testcase_08 AC 116 ms
55,724 KB
testcase_09 AC 117 ms
55,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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