跳至正文

1 条题解

  • 0
    @ 2026-10-2 2:21:31

    采用双精度以上累加,多项式合法数值结果由独立评测器校验。

    #include <bits/stdc++.h>
    using namespace std;
    int main(){long double x;int n;cin>>x>>n;long double p=1,s=1;for(int i=1;i<=n;i++){p*=x;s+=p;}cout<<fixed<<setprecision(2)<<s<<"\n";}
    
    • 1

    信息

    ID
    3769
    时间
    1000ms
    内存
    128MiB
    难度
    2
    标签
    递交数
    0
    已通过
    0
    上传者