結果
問題 |
No.1700 floor X
|
ユーザー |
![]() |
提出日時 | 2025-07-05 23:37:35 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 549 bytes |
コンパイル時間 | 2,258 ms |
コンパイル使用メモリ | 191,420 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-07-05 23:37:42 |
合計ジャッジ時間 | 5,252 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); int t; if (!(cin >> t)) return 1; while (t--) { ll n; if (!(cin >> n)) return 1; cout << isqrt(n) << '\n'; } return 0; }