結果

問題 No.46 はじめのn歩
ユーザー gomagoma
提出日時 2017-09-14 21:02:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 336 bytes
コンパイル時間 1,870 ms
コンパイル使用メモリ 73,868 KB
実行使用メモリ 41,444 KB
最終ジャッジ日時 2024-04-25 09:25:34
合計ジャッジ時間 3,746 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
41,400 KB
testcase_01 AC 114 ms
41,160 KB
testcase_02 AC 113 ms
40,972 KB
testcase_03 AC 103 ms
40,156 KB
testcase_04 AC 114 ms
40,420 KB
testcase_05 AC 111 ms
41,444 KB
testcase_06 AC 118 ms
41,192 KB
testcase_07 AC 99 ms
39,772 KB
testcase_08 AC 101 ms
40,128 KB
testcase_09 AC 116 ms
41,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

	}
}
0