結果

問題 No.46 はじめのn歩
ユーザー abcabc
提出日時 2016-10-23 11:48:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 424 bytes
コンパイル時間 2,005 ms
コンパイル使用メモリ 74,020 KB
実行使用メモリ 41,604 KB
最終ジャッジ日時 2024-05-03 04:47:15
合計ジャッジ時間 3,496 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
41,568 KB
testcase_01 AC 120 ms
41,360 KB
testcase_02 AC 114 ms
41,176 KB
testcase_03 AC 113 ms
41,208 KB
testcase_04 AC 112 ms
41,380 KB
testcase_05 AC 97 ms
41,364 KB
testcase_06 AC 112 ms
41,604 KB
testcase_07 AC 102 ms
40,844 KB
testcase_08 AC 116 ms
41,016 KB
testcase_09 AC 100 ms
41,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int strideLength = sc.nextInt();
        int distanceWalking = sc.nextInt();

        int strideTotal = distanceWalking / strideLength;

        if (distanceWalking % strideLength > 0) {
            strideTotal++;
        }

        System.out.println(strideTotal);

    }

}
0