結果
問題 |
No.2420 Simple Problem
|
ユーザー |
|
提出日時 | 2023-07-11 14:10:08 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 540 bytes |
コンパイル時間 | 1,269 ms |
コンパイル使用メモリ | 127,360 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 04:34:43 |
合計ジャッジ時間 | 12,999 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 33 |
ソースコード
#include <climits> #include <iostream> #include <cassert> #include <cmath> using namespace std; using ll = long long; void solve() { ll a, b; cin >> a >> b; ll min_x = max<ll>(1, sqrt(a) + sqrt(b) - 10); for (int x = min_x; x < min_x + 20; ++x) { ll x4 = x * x * x * x; ll sb = 2 * x * x * (a + b); if (x4 - sb > 0) { cout << x << endl; return; } } } int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { solve(); } return 0; }