結果
| 問題 |
No.598 オーバーフローファンタジー
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-22 01:46:28 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 125 ms / 2,000 ms |
| コード長 | 625 bytes |
| コンパイル時間 | 2,726 ms |
| コンパイル使用メモリ | 75,256 KB |
| 実行使用メモリ | 41,384 KB |
| 最終ジャッジ日時 | 2024-12-24 06:04:53 |
| 合計ジャッジ時間 | 6,943 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws FileNotFoundException {
long t = System.currentTimeMillis();
new Main().run();
System.err.println(System.currentTimeMillis() - t);
}
void run() {
Scanner sc = new Scanner(System.in);
int N=sc.nextInt();
long X=sc.nextLong();
long A=sc.nextLong();
long B=sc.nextLong();
long ans=Math.min((X+A-1)/A,((1L<<N-1)-X+B-1)/B);
System.out.println(ans);
}
static void tr(Object... objects) {
System.out.println(Arrays.deepToString(objects));
}
}