結果

問題 No.46 はじめのn歩
ユーザー hideohideo
提出日時 2017-06-07 17:08:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 604 bytes
コンパイル時間 2,257 ms
コンパイル使用メモリ 74,344 KB
実行使用メモリ 57,560 KB
最終ジャッジ日時 2023-10-23 18:58:28
合計ジャッジ時間 4,292 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,468 KB
testcase_01 AC 117 ms
56,116 KB
testcase_02 AC 127 ms
57,440 KB
testcase_03 AC 116 ms
56,108 KB
testcase_04 AC 128 ms
57,484 KB
testcase_05 AC 126 ms
57,124 KB
testcase_06 AC 128 ms
57,560 KB
testcase_07 AC 127 ms
57,168 KB
testcase_08 AC 126 ms
57,084 KB
testcase_09 AC 127 ms
57,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        
         Scanner s = new Scanner(System.in);
        int X = s.nextInt();
        int Y = s.nextInt();
        
        int res = Y/X;
        int tt = Y%X;
        
        if (tt>0){
            res = Y/X+1;
        }else{
            res = Y/X;
        }
        System.out.println(res);
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
    }
}

0