0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-05 12:18:48 +00:00
OI-codes/AcWing/790/790.cpp

22 lines
364 B
C++
Raw Normal View History

#include <bits/stdc++.h>
using namespace std;
double n, l, r;
int main() {
cin >> n;
l = -100.00;
r = 100.00;
while (r - l > 1e-8) {
double mid = (l + r) / 2;
if (mid * mid * mid >= n) {
r = mid;
} else {
l = mid;
}
}
cout << fixed << setprecision(6) << l << endl;
return 0;
}