Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
71637 sh25_ganzy 计算多项式的值 C++ Accepted 0 MS 260 KB 223 2025-10-26 16:49:17

Tests(1/1):


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


Judgement Protocol: