結果

問題 No.46 はじめのn歩
ユーザー len_discoreglen_discoreg
提出日時 2016-06-02 17:14:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 575 ms / 5,000 ms
コード長 348 bytes
コンパイル時間 2,142 ms
コンパイル使用メモリ 73,948 KB
実行使用メモリ 41,664 KB
最終ジャッジ日時 2024-04-16 23:08:07
合計ジャッジ時間 4,728 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,556 KB
testcase_01 AC 126 ms
41,600 KB
testcase_02 AC 126 ms
41,508 KB
testcase_03 AC 126 ms
41,664 KB
testcase_04 AC 122 ms
41,660 KB
testcase_05 AC 113 ms
41,428 KB
testcase_06 AC 127 ms
41,620 KB
testcase_07 AC 114 ms
41,424 KB
testcase_08 AC 575 ms
41,584 KB
testcase_09 AC 131 ms
41,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
    public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
    	int a = scan.nextInt();
    	int b = scan.nextInt();

    	int pedometer = 0;

    	int total = 0;
    	while(total < b){
    		pedometer++;
    		total = total + a;
    	}
    	System.out.println(pedometer);
    }
}
0