結果
問題 |
No.1700 floor X
|
ユーザー |
|
提出日時 | 2023-10-28 12:31:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 474 bytes |
コンパイル時間 | 1,652 ms |
コンパイル使用メモリ | 167,552 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-25 16:18:48 |
合計ジャッジ時間 | 4,244 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 44 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i<n; ++i) #define repl(i,m,n) for(ll i=m; i<n; ++i) int main(){ int T; cin >> T; rep(i, 0, T){ ll N; cin >> N; ll ok = 0LL, ng = 1000000001LL; while(abs(ok - ng) > 1LL){ ll ce = (ok + ng) / 2LL; if(ce*ce > N) ng = ce; else ok = ce; } cout << ok << endl; } return 0; }