赞
踩
#include<iostream>
#include<iomanip>
using namespace std;
int main() {
double num, val;
cin >> num;
for(val = -20; val <= 20; val += 0.01){
if(num - val * val * val <= 1e-8){
break;
}
}
cout << fixed << setprecision(1) << val << endl;
return 0;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。