結果
| 問題 |
No.598 オーバーフローファンタジー
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-02 13:26:35 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 257 bytes |
| コンパイル時間 | 244 ms |
| コンパイル使用メモリ | 29,056 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-25 02:45:54 |
| 合計ジャッジ時間 | 1,109 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <stdio.h>
#include <math.h>
int main(void)
{
long n,x,a,b;
scanf("%ld%ld%ld%ld",&n,&x,&a,&b);
if((x+a-1)/a>((long)pow(2,n-1)-1-x+b)/b)printf("%ld",((long)pow(2,n-1)-1-x+b)/b);
else printf("%ld",(x+a-1)/a);
return 0;
}