結果

問題 No.46 はじめのn歩
ユーザー haru66nylonharu66nylon
提出日時 2019-02-23 16:35:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 773 ms / 5,000 ms
コード長 363 bytes
コンパイル時間 1,741 ms
コンパイル使用メモリ 74,360 KB
実行使用メモリ 41,192 KB
最終ジャッジ日時 2024-05-07 14:57:26
合計ジャッジ時間 4,191 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
39,616 KB
testcase_01 AC 102 ms
39,912 KB
testcase_02 AC 111 ms
41,068 KB
testcase_03 AC 113 ms
40,976 KB
testcase_04 AC 100 ms
39,920 KB
testcase_05 AC 106 ms
40,988 KB
testcase_06 AC 112 ms
41,192 KB
testcase_07 AC 103 ms
40,096 KB
testcase_08 AC 773 ms
40,044 KB
testcase_09 AC 113 ms
41,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = 0;
        
        while(b > 0){
            b = b - a;
            count++;
        }
        
        System.out.println(count);
    }
}
0