結果

問題 No.46 はじめのn歩
ユーザー Shunsuke Kamada
提出日時 2018-09-25 21:49:51
言語 Java
(openjdk 23)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 468 bytes
コンパイル時間 1,999 ms
コンパイル使用メモリ 74,264 KB
実行使用メモリ 54,444 KB
最終ジャッジ日時 2024-10-06 02:41:05
合計ジャッジ時間 3,888 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter;
import java.util.*;

public class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int ans;
        
        if(b%a!=0){
            ans = (b/a)+1;
        } else {
            ans = b/a;
        }
        out.println(ans);
        out.flush();
    }
}
0