Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
74555 sh25_shenpy 计算多项式的值 C++ 通过 0 MS 264 KB 267 2025-11-29 13:14:57

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { float x; double sum=0,w; int n; cin>>x>>n; for(int i=n;i>=1;i--){ w=pow(x,i); sum+=w; } sum+=1; cout<<fixed<<setprecision(2)<<sum; return 0; }


测评信息: