結果

問題 No.598 オーバーフローファンタジー
ユーザー aaaaasatoriaaaaasatori
提出日時 2018-02-16 16:06:55
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 7,520 ms
コンパイル使用メモリ 71,948 KB
実行使用メモリ 56,244 KB
最終ジャッジ日時 2023-09-02 11:37:42
合計ジャッジ時間 10,209 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
56,072 KB
testcase_01 AC 125 ms
56,004 KB
testcase_02 AC 126 ms
55,828 KB
testcase_03 AC 125 ms
55,964 KB
testcase_04 AC 127 ms
55,900 KB
testcase_05 AC 127 ms
54,100 KB
testcase_06 AC 125 ms
55,816 KB
testcase_07 AC 126 ms
55,876 KB
testcase_08 AC 126 ms
55,952 KB
testcase_09 AC 125 ms
55,952 KB
testcase_10 AC 129 ms
56,048 KB
testcase_11 AC 125 ms
56,120 KB
testcase_12 AC 126 ms
56,036 KB
testcase_13 AC 123 ms
55,716 KB
testcase_14 AC 125 ms
55,852 KB
testcase_15 AC 124 ms
55,608 KB
testcase_16 AC 124 ms
55,868 KB
testcase_17 AC 125 ms
56,244 KB
testcase_18 AC 127 ms
56,040 KB
testcase_19 AC 125 ms
55,752 KB
testcase_20 AC 124 ms
56,128 KB
testcase_21 AC 124 ms
55,904 KB
testcase_22 AC 123 ms
56,008 KB
testcase_23 WA -
testcase_24 AC 127 ms
55,544 KB
testcase_25 AC 127 ms
55,612 KB
testcase_26 AC 126 ms
56,136 KB
testcase_27 AC 125 ms
55,896 KB
testcase_28 AC 124 ms
55,856 KB
testcase_29 AC 126 ms
55,908 KB
testcase_30 AC 126 ms
55,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No598 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int X = sc.nextInt();
		int A = sc.nextInt();
		int B = sc.nextInt();
		int MAX =(int)Math.pow(2, N-1);
		
		System.out.println((int)Math.min(Math.ceil((double)X/A),Math.ceil((double)(MAX-X)/B)));
	}
}
0