結果

問題 No.46 はじめのn歩
ユーザー KibidanKibidan
提出日時 2017-02-21 12:27:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 592 ms / 5,000 ms
コード長 361 bytes
コンパイル時間 2,147 ms
コンパイル使用メモリ 71,892 KB
実行使用メモリ 55,896 KB
最終ジャッジ日時 2023-08-28 22:24:29
合計ジャッジ時間 4,536 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,508 KB
testcase_01 AC 121 ms
55,788 KB
testcase_02 AC 120 ms
55,896 KB
testcase_03 AC 119 ms
55,476 KB
testcase_04 AC 120 ms
55,676 KB
testcase_05 AC 119 ms
55,472 KB
testcase_06 AC 118 ms
55,780 KB
testcase_07 AC 121 ms
55,780 KB
testcase_08 AC 592 ms
55,820 KB
testcase_09 AC 118 ms
55,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int count=0;

        do{
            b-=a;
            count++;
        }while(b>0);
        System.out.println(count);
    }
}
0