結果
問題 | No.1700 floor X |
ユーザー |
![]() |
提出日時 | 2021-10-08 21:52:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 718 bytes |
コンパイル時間 | 2,373 ms |
コンパイル使用メモリ | 192,748 KB |
最終ジャッジ日時 | 2025-01-24 21:51:28 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 44 |
ソースコード
#include<bits/stdc++.h>//#include<atcoder/all>using namespace std;//using namespace atcoder;#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)#define rep(i, n) repr(i, 0, n)#define INF 2e9//#define MOD 1000000007#define MOD 998244353#define LINF (long long)4e18#define jck 3.141592#define PI acos(-1.0)const double EPS = 1e-10;using ll = long long;using Pi = pair<int,int>;using Pl = pair<ll,ll>;//using mint = modint998244353;int dh[] = {-1,0,1,0};int dw[] = {0,1,0,-1};int main(){int t; cin >> t;while(t--){ll n; cin >> n;ll ans = sqrt(n);if(ans*ans > n) ans--;if((ans+1)*(ans+1) <= n) ans++;cout << ans << endl;}}