結果

問題 No.598 オーバーフローファンタジー
ユーザー aaaaasatoriaaaaasatori
提出日時 2018-02-16 17:43:09
言語 Java19
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 364 bytes
コンパイル時間 3,408 ms
コンパイル使用メモリ 72,092 KB
実行使用メモリ 56,284 KB
最終ジャッジ日時 2023-09-02 15:28:24
合計ジャッジ時間 8,832 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,812 KB
testcase_01 AC 124 ms
55,360 KB
testcase_02 AC 126 ms
55,584 KB
testcase_03 AC 125 ms
55,600 KB
testcase_04 AC 127 ms
55,804 KB
testcase_05 AC 123 ms
55,796 KB
testcase_06 AC 121 ms
56,040 KB
testcase_07 AC 120 ms
55,636 KB
testcase_08 AC 124 ms
55,856 KB
testcase_09 AC 126 ms
55,940 KB
testcase_10 AC 127 ms
56,080 KB
testcase_11 AC 128 ms
55,924 KB
testcase_12 AC 124 ms
55,644 KB
testcase_13 AC 121 ms
55,796 KB
testcase_14 AC 123 ms
55,932 KB
testcase_15 AC 126 ms
55,500 KB
testcase_16 AC 124 ms
55,832 KB
testcase_17 AC 122 ms
55,632 KB
testcase_18 AC 126 ms
56,184 KB
testcase_19 AC 122 ms
55,388 KB
testcase_20 AC 123 ms
56,284 KB
testcase_21 AC 123 ms
55,844 KB
testcase_22 AC 124 ms
55,560 KB
testcase_23 AC 123 ms
56,044 KB
testcase_24 AC 122 ms
55,692 KB
testcase_25 AC 121 ms
55,948 KB
testcase_26 AC 123 ms
55,680 KB
testcase_27 AC 125 ms
55,784 KB
testcase_28 AC 126 ms
56,184 KB
testcase_29 AC 126 ms
55,556 KB
testcase_30 AC 124 ms
55,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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