結果

問題 No.1700 floor X
ユーザー karinohito
提出日時 2021-10-11 13:56:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 535 bytes
コンパイル時間 1,609 ms
コンパイル使用メモリ 170,040 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-03 10:41:35
合計ジャッジ時間 3,909 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(A) A.begin(),A.end()
using vll = vector<ll>;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
vector<vector<pair<ll, ll>>> G;

ll sqrtz(ll N) {
    ll L = 0;
    ll R = sqrt(N)+10000;
    while (abs(R - L) > 1) {
        ll mid = (R +L) / 2;
        if (mid * mid <= N)L = mid;
        else R = mid;
    }
    return L;
    
}


int main() {
   ll T;
   cin>>T;
   rep(t,T){
       ll N;
       cin>>N;
       cout<<sqrtz(N)<<endl;
   }
}
0