結果

問題 No.598 オーバーフローファンタジー
ユーザー 夕叢霧香(ゆうむらきりか)夕叢霧香(ゆうむらきりか)
提出日時 2017-11-24 22:24:19
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 365 bytes
コンパイル時間 2,342 ms
コンパイル使用メモリ 71,232 KB
実行使用メモリ 57,744 KB
最終ジャッジ日時 2023-08-18 04:42:12
合計ジャッジ時間 8,224 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,756 KB
testcase_01 AC 126 ms
56,184 KB
testcase_02 AC 125 ms
55,956 KB
testcase_03 AC 123 ms
55,836 KB
testcase_04 AC 125 ms
55,992 KB
testcase_05 AC 125 ms
55,756 KB
testcase_06 AC 122 ms
55,752 KB
testcase_07 AC 125 ms
55,852 KB
testcase_08 AC 124 ms
55,848 KB
testcase_09 AC 126 ms
55,840 KB
testcase_10 AC 126 ms
55,784 KB
testcase_11 AC 124 ms
55,788 KB
testcase_12 AC 122 ms
55,980 KB
testcase_13 WA -
testcase_14 AC 126 ms
55,996 KB
testcase_15 AC 122 ms
55,824 KB
testcase_16 AC 124 ms
56,032 KB
testcase_17 AC 122 ms
55,536 KB
testcase_18 AC 122 ms
55,996 KB
testcase_19 AC 124 ms
55,796 KB
testcase_20 AC 125 ms
55,736 KB
testcase_21 AC 125 ms
55,568 KB
testcase_22 AC 123 ms
55,704 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 124 ms
55,844 KB
testcase_26 AC 124 ms
55,548 KB
testcase_27 AC 122 ms
55,852 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n=scan.nextInt();
        long x=scan.nextLong();
        long a=scan.nextLong();
        long b=scan.nextLong();
        long mi=(x+a-1)/a;
        mi=Math.min(mi,((1<<(n-1))-x+b-1)/b);
        System.out.println(mi);
    }
}
0