結果
問題 |
No.598 オーバーフローファンタジー
|
ユーザー |
![]() |
提出日時 | 2017-11-24 22:24:19 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 365 bytes |
コンパイル時間 | 2,068 ms |
コンパイル使用メモリ | 74,056 KB |
実行使用メモリ | 54,060 KB |
最終ジャッジ日時 | 2024-11-27 07:21:44 |
合計ジャッジ時間 | 6,270 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 6 |
ソースコード
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); } }