結果

問題 No.46 はじめのn歩
ユーザー moriyukimoriyuki
提出日時 2023-04-26 11:10:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 321 bytes
コンパイル時間 2,959 ms
コンパイル使用メモリ 73,924 KB
実行使用メモリ 54,092 KB
最終ジャッジ日時 2024-04-27 15:55:08
合計ジャッジ時間 4,692 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
53,844 KB
testcase_01 AC 116 ms
54,000 KB
testcase_02 AC 116 ms
54,080 KB
testcase_03 AC 118 ms
53,812 KB
testcase_04 AC 119 ms
53,744 KB
testcase_05 AC 113 ms
53,744 KB
testcase_06 AC 116 ms
53,820 KB
testcase_07 AC 110 ms
53,180 KB
testcase_08 AC 114 ms
54,092 KB
testcase_09 AC 98 ms
52,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Firststep {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double a = sc.nextInt();
		double b = sc.nextInt();
		
		if (b % a == 0) {
			System.out.println((int)(b/a));
		} else {
			System.out.println((int)(b/a) + 1);
		}
		
		sc.close();
	}
}
0