結果

問題 No.46 はじめのn歩
ユーザー nishimitnishimit
提出日時 2018-06-30 16:41:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 689 ms / 5,000 ms
コード長 340 bytes
コンパイル時間 3,297 ms
コンパイル使用メモリ 72,444 KB
実行使用メモリ 56,636 KB
最終ジャッジ日時 2023-09-13 16:21:01
合計ジャッジ時間 5,902 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,636 KB
testcase_01 AC 122 ms
56,008 KB
testcase_02 AC 124 ms
55,692 KB
testcase_03 AC 121 ms
55,664 KB
testcase_04 AC 120 ms
55,952 KB
testcase_05 AC 121 ms
56,024 KB
testcase_06 AC 119 ms
56,008 KB
testcase_07 AC 122 ms
56,032 KB
testcase_08 AC 689 ms
55,948 KB
testcase_09 AC 120 ms
55,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Nwalk{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        for(int i=1;;i++){
            if(i*a>=b){
                System.out.println(i);
                break;
            }
        }
    }
}
0