結果

問題 No.598 オーバーフローファンタジー
コンテスト
ユーザー aaaaasatori
提出日時 2018-02-16 16:06:55
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 2,825 ms
コンパイル使用メモリ 74,164 KB
実行使用メモリ 54,460 KB
最終ジャッジ日時 2024-06-11 18:21:35
合計ジャッジ時間 7,413 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 1
権限があれば一括ダウンロードができます

ソースコード

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