結果
問題 |
No.1700 floor X
|
ユーザー |
![]() |
提出日時 | 2025-07-11 13:36:55 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 512 bytes |
コンパイル時間 | 3,295 ms |
コンパイル使用メモリ | 272,196 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-07-11 13:37:01 |
合計ジャッジ時間 | 5,330 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 20 WA * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define ll long long #define maxn #define el '\n' ll t,n; void solve() { cin >> n; ll l=1, r=n, res=0; while(r-l>5) { ll m=(l+r)/2; if(m*m<=n) l=m; else r=m-1; } for(ll i=l; i<=r; i++) if(i*i<=n) res=max(res,i); cout << res << el; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> t; while(t--) { solve(); } } // orzhienq coder manh nhat ha tien