結果

問題 No.2420 Simple Problem
ユーザー a01sa01toa01sa01to
提出日時 2023-08-12 14:11:22
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 707 ms / 2,000 ms
コード長 404 bytes
コンパイル時間 1,929 ms
コンパイル使用メモリ 200,424 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-30 05:15:44
合計ジャッジ時間 24,412 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 297 ms
6,940 KB
testcase_02 AC 5 ms
6,944 KB
testcase_03 AC 107 ms
6,940 KB
testcase_04 AC 567 ms
6,940 KB
testcase_05 AC 359 ms
6,944 KB
testcase_06 AC 700 ms
6,940 KB
testcase_07 AC 696 ms
6,940 KB
testcase_08 AC 687 ms
6,940 KB
testcase_09 AC 693 ms
6,940 KB
testcase_10 AC 704 ms
6,940 KB
testcase_11 AC 690 ms
6,940 KB
testcase_12 AC 699 ms
6,940 KB
testcase_13 AC 698 ms
6,944 KB
testcase_14 AC 702 ms
6,940 KB
testcase_15 AC 695 ms
6,940 KB
testcase_16 AC 695 ms
6,944 KB
testcase_17 AC 694 ms
6,944 KB
testcase_18 AC 701 ms
6,944 KB
testcase_19 AC 686 ms
6,940 KB
testcase_20 AC 707 ms
6,940 KB
testcase_21 AC 693 ms
6,940 KB
testcase_22 AC 699 ms
6,940 KB
testcase_23 AC 692 ms
6,940 KB
testcase_24 AC 691 ms
6,944 KB
testcase_25 AC 693 ms
6,940 KB
testcase_26 AC 2 ms
6,944 KB
testcase_27 AC 544 ms
6,944 KB
testcase_28 AC 557 ms
6,940 KB
testcase_29 AC 554 ms
6,940 KB
testcase_30 AC 555 ms
6,940 KB
testcase_31 AC 560 ms
6,944 KB
testcase_32 AC 2 ms
6,944 KB
testcase_33 AC 281 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
  #include "settings/debug.cpp"
  #define _GLIBCXX_DEBUG
#else
  #define Debug(...) void(0)
#endif
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); ++i)

int main() {
  int n;
  cin >> n;
  while (n--) {
    int a, b;
    cin >> a >> b;
    long double x = sqrtl(a) + sqrtl(b);
    cout << floor(x) + 1 << endl;
  }
  return 0;
}
0