結果
| 問題 |
No.1700 floor X
|
| コンテスト | |
| ユーザー |
Drice27149
|
| 提出日時 | 2021-10-08 22:01:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 2,000 ms |
| コード長 | 318 bytes |
| コンパイル時間 | 269 ms |
| コンパイル使用メモリ | 37,632 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-03 10:26:24 |
| 合計ジャッジ時間 | 1,822 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 44 |
ソースコード
#include <cstdio>
#include <cmath>
int main(){
int T;
scanf("%d",&T);
while(T--){
long long u;
scanf("%lld",&u);
long long L = 1, R = 1000000000ll;
long long res = 1;
while(L<=R){
auto M = (L+R)/2ll;
if(M*M <= u){
res = M;
L = M+1;
}
else R = M-1;
}
printf("%lld\n",res);
}
return 0;
}
Drice27149