1446: 方程f(x)的根
Memory Limit:128 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:174
Solved:86
Description
求方程f(x)=2x+3x-4x=0在[1,2]内的根。
提示:2x可以表示成exp(x*ln(2))的形式,或者用数学库中的pow函数。
Input
[1 ,2]的区间值。
Output
方程f(x)=0的根,x的值精确到小数点10位。
Sample Input Copy
无输入
Sample Output Copy
1.5071105957(这个只是输出的格式,并不是答案)
HINT
本题只有一个测试点。
python提示:
l, r = 1, 2
while __________:
print("%.10lf" % r)