結果
問題 |
No.598 オーバーフローファンタジー
|
ユーザー |
|
提出日時 | 2017-12-01 23:41:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 312 bytes |
コンパイル時間 | 681 ms |
コンパイル使用メモリ | 63,360 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 22:48:21 |
合計ジャッジ時間 | 1,456 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 28 |
ソースコード
#include <iostream> using namespace std; int main() { int n; long long x, a, b; cin >> n >> x >> a >> b; long long y = (1LL << (n - 1)); cout << y << ", " << y - x << ", " << y - x + b - 1 << endl; long long ans = min( (x + a - 1) / a, (y - x + b - 1) / b ); cout << ans << endl; return 0; }