Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
117018 | 李茗宇 | 06计算f(x)的值 | C++ | Wrong Answer | 0 MS | 272 KB | 383 | 2025-04-13 13:29:30 |
#include <iostream> #include <iomanip> using namespace std; int main() { double a, b, c, d, x; cin >> a >> b >> c >> d >> x; // 计算三次多项式 double result = a * x * x * x + b * x * x + c * x + d; // 设置输出格式为固定小数,保留5位小数 cout << fixed << setprecision(5) << result << endl; return 0; }
------Input------
1.5 3.1 1.6 8.2 9.4
------Answer-----
35.76250
------Your output-----
1543.03200