提交时间:2026-02-06 19:31:29
运行 ID: 84038
#include <bits/stdc++.h> using namespace std; inline double f(double x){return pow(2,x)+pow(3,x)-pow(4,x);} const double x0=1e-10; int main( ) { for(double x=1;x<=2;x+=x0){ if(f(x)*f(x+x0)<0){ cout<<x; return 0; } else if(f(x)==0){ cout<<x; return 0; } else if(f(x+x0)==0){ cout<<x+x0; return 0; } } }