結果

問題 No.1700 floor X
ユーザー yansi819
提出日時 2024-03-21 10:57:09
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 421 bytes
コンパイル時間 4,048 ms
コンパイル使用メモリ 251,284 KB
最終ジャッジ日時 2025-02-20 10:33:30
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;

int T;
ll N;

void solve() {
  cin >> N;
  ll ok = 1, ng = 1000000001;
  for (int i = 0; i < 60; i++) {
    ll md = (ok + ng) / 2;
    if (md * md <= N) ok = md;
    else ng = md;
  }
  cout << ok << endl;
}

int main() {
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
0