/**
* Sergey Kopeliovich (burunduk30@gmail.com)
*/
#include <algorithm>
#include <ranges>
#include <iostream>
using namespace std;
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
#define all(a) (a).begin(), (a).end()
// https://codeforces.com/blog/entry/97061
int Sqrt(int64_t x) {
return *ranges::lower_bound(views::iota(0, 1e9), true, {}, [x](int z) {
return (int64_t)z * z > x;
}) - 1;
}
int main() {
cout << Sqrt(123) << endl;
}
|