#include #include #include #include using namespace std; using namespace boost::multiprecision; typedef cpp_int Bint; Bint sqrt_floor(Bint x) { Bint ceil = x, floor = 1; while (ceil > floor + 1) { auto m = (ceil+floor)/2; if (m*m <= x) floor = m; else ceil = m; } return floor; } int main() { const int prec = 20; Bint unit = pow(Bint(10),prec); cout<> N; Bint ans = 0; for (auto i=0; i> x; auto p = sqrt_floor(x); cout << ans / unit << "." << setfill('0') << right << setw(prec - 3) << (ans % unit)/1000 << std::setfill(' ') << endl; } return 0; }