結果

問題 No.1700 floor X
ユーザー Yug_min_null
提出日時 2021-11-18 00:57:45
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 2,031 ms
コンパイル使用メモリ 186,596 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-03 10:49:45
合計ジャッジ時間 4,422 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

int main(){
  int T; cin >> T;
  for(int i = 0; i < T; i++){
    ll N; cin >> N;
    int bot = 0, top = INT_MAX-1;
    while(bot+1 < top){
      ll mid = (bot+top)/2;
      ll M = mid*mid;
      if(M <= N) bot = mid;
      else top = mid;
    }
    cout << bot << endl;
  }
}
0