結果
問題 | No.1700 floor X |
ユーザー |
![]() |
提出日時 | 2021-10-08 21:53:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 342 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 30,976 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-03 10:19:30 |
合計ジャッジ時間 | 1,738 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 44 |
ソースコード
#include <stdio.h> int main() { int T; scanf("%d",&T); while(T--) { long long int a; scanf("%lld",&a); long long int min = 1, max = 1234567890; long long int ans = 0; while(min<=max) { long long int h = (min+max)/2; if(h*h<=a) { ans = h; min = h+1; } else max = h-1; } printf("%lld\n",ans); } }