結果

問題 No.46 はじめのn歩
ユーザー SaYa
提出日時 2015-11-03 22:24:36
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 535 bytes
コンパイル時間 2,233 ms
コンパイル使用メモリ 74,500 KB
実行使用メモリ 54,216 KB
最終ジャッジ日時 2024-09-13 12:19:37
合計ジャッジ時間 4,100 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] split = scanner.nextLine().split(" ");
        int stride = Integer.parseInt(split[0]);
        int section = Integer.parseInt(split[1]);

        // 区間をちょうど歩みきった場合
        if ((section % stride) == 0) {
            System.out.println((section / stride));
        } else {
            System.out.println((section / stride) + 1);
        }
    }
}
0