結果
問題 |
No.1700 floor X
|
ユーザー |
![]() |
提出日時 | 2025-07-06 00:20:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 708 bytes |
コンパイル時間 | 2,354 ms |
コンパイル使用メモリ | 191,580 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-07-06 00:20:33 |
合計ジャッジ時間 | 5,370 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | AC * 31 RE * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll isqrt(ll n) { ll l = 0, r = n, ans = 0; while (l <= r) { ll m = l + (r - l) / 2; if (m <= n / m) { ans = m; l = m + 1; } else { r = m - 1; } } return ans; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll t; cin >> t; if (cin.fail()) { cerr << "Input t khng h?p l?!\n"; return 1; } while (t--) { ll n; cin >> n; if (cin.fail()) { cerr << "Input n khng h?p l?!\n"; return 1; } cout << isqrt(n) << '\n'; } return 0; }