結果

問題 No.598 オーバーフローファンタジー
ユーザー tentententen
提出日時 2020-09-06 16:26:10
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 346 bytes
コンパイル時間 3,413 ms
コンパイル使用メモリ 72,340 KB
実行使用メモリ 57,848 KB
最終ジャッジ日時 2023-08-19 14:02:32
合計ジャッジ時間 9,120 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,448 KB
testcase_01 AC 124 ms
55,952 KB
testcase_02 AC 125 ms
55,720 KB
testcase_03 AC 123 ms
53,404 KB
testcase_04 AC 124 ms
55,648 KB
testcase_05 AC 125 ms
56,144 KB
testcase_06 AC 124 ms
56,024 KB
testcase_07 AC 125 ms
56,240 KB
testcase_08 AC 125 ms
56,156 KB
testcase_09 AC 122 ms
55,960 KB
testcase_10 AC 123 ms
55,828 KB
testcase_11 AC 127 ms
55,588 KB
testcase_12 AC 124 ms
55,696 KB
testcase_13 AC 127 ms
55,596 KB
testcase_14 AC 125 ms
55,932 KB
testcase_15 AC 124 ms
55,732 KB
testcase_16 AC 126 ms
55,712 KB
testcase_17 AC 124 ms
55,572 KB
testcase_18 AC 126 ms
55,584 KB
testcase_19 AC 127 ms
55,424 KB
testcase_20 AC 127 ms
55,940 KB
testcase_21 AC 125 ms
55,928 KB
testcase_22 AC 123 ms
56,136 KB
testcase_23 AC 124 ms
57,848 KB
testcase_24 WA -
testcase_25 AC 122 ms
55,540 KB
testcase_26 AC 123 ms
55,640 KB
testcase_27 AC 122 ms
55,588 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	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();
    	long ans = Math.min((x + a - 1) / a, ((1L << (n - 1)) - x + b - 1) / b);
    	System.out.println(ans);
	}
}
0