7 solutions

  • 4
    @ 2023-7-15 17:26:05
    #include<iostream>
    #include<iomanip>
    using namespace std;
    double a,b,c,d,x,s=0;
    int main(){
    	cin>>x>>a>>b>>c>>d;
    	s=a*x*x*x+b*x*x+c*x+d;
    	cout<<fixed<<setprecision(7)<<s;
    	return 0;
    }
    
    • 3
      @ 2023-7-13 17:46:18

      标准答案,可以抄袭: #include #include using namespace std;

      int main() { double a, b, c, d, x; cin >> x >> a >> b >> c >> d; double mul = a * x * x * x + b * x * x + c * x + d; cout << fixed << setprecision(7) << mul << endl; return 0; }

      • 1
        @ 2024-1-27 11:17:12
        #include <iostream>
        using namespace std;
        int main()
        {
        	double a, b, c, d, x;
        	cin >> x >> a >> b >> c >> d;
        	cout << fixed << setprecision(7) << a * x * x * x + b * x * x + c * x + d << endl;
        	return 0;
        }
        

        9行

        • 1
          @ 2023-9-16 21:29:31
          //10行代码,完美解决
          #include<iostream>
          #include<iomanip>
          using namespace std;
          double a,b,c,d,x,s=0;
          int main(){
          	cin>>x>>a>>b>>c>>d;
          	s=a*x*x*x+b*x*x+c*x+d;
          	cout<<fixed<<setprecision(7)<<s;
          	return 0;
          }
          //you can copy it
          
          • 0
            @ 2024-7-10 17:27:07

            #include #include using namespace std; int main(){ double a,b,c,d,x,y; cin>>x>>a>>b>>c>>d; y=axxx+bxx+cx+d; cout<<fixed<<setprecision(7)<<y; return 0; }

            • 0
              @ 2023-9-9 20:56:45

              题解 #include

              using namespace std; int main(){ double a , b , c , d , x , l; cin >> x >> a >> b >> c >> d; l = a * x * x * x + b * x * x + c * x + d; printf("%.7f" , l); return 0; }

              • -1
                @ 2023-11-24 21:33:06
                #include<iostream>
                #include<iomanip>
                using namespace std;
                long double f(long double x,
                long double a,long double b,
                long double c,long double d){
                	return a*x*x*x+b*x*x+c*x+d;
                }
                int main(){
                	long double a,b,c,d,x;
                	cin>>x>>a>>b>>c>>d;
                	cout<<setprecision(7)<<fixed<<f(x,a,b,c,d);
                }
                
                • 1

                Information

                ID
                498
                Time
                1000ms
                Memory
                256MiB
                Difficulty
                2
                Tags
                # Submissions
                92
                Accepted
                59
                Uploaded By