結果

問題 No.46 はじめのn歩
ユーザー KatoooooKatooooo
提出日時 2017-02-10 22:20:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 303 bytes
コンパイル時間 6,145 ms
コンパイル使用メモリ 71,932 KB
実行使用メモリ 55,980 KB
最終ジャッジ日時 2023-08-27 20:42:59
合計ジャッジ時間 6,289 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,628 KB
testcase_01 AC 129 ms
55,556 KB
testcase_02 AC 127 ms
55,652 KB
testcase_03 AC 128 ms
55,816 KB
testcase_04 AC 127 ms
55,980 KB
testcase_05 AC 128 ms
55,776 KB
testcase_06 AC 130 ms
55,820 KB
testcase_07 AC 132 ms
55,576 KB
testcase_08 AC 130 ms
55,820 KB
testcase_09 AC 133 ms
55,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class FirstStep {

  public static void main(String[] args){

    Scanner input=new Scanner(System.in);
    int a = input.nextInt();
    int b = input.nextInt();

    int steps = b/a; //歩数

    if(b%a!=0){
      steps++;
    }

    System.out.println(steps);

  }
}
0