5 条题解

  • 0
    @ 2022-12-15 20:39:02
    #include<iostream>
    #include<iomanip>
    #include <math.h>
    using namespace std;
    int main(){
    	double x,c,s=0,d;
    	int n;
    	cin>>x>>n;
    	int g=x,h; 
    	for(int i=n;i>=1;i--){
    		h=i;
    		c=pow(x,h);
    		s+=c;
    	}
    	d=s+1;
    	cout<<fixed<<setprecision(2)<<d;
    }
    

    太简单了

    • @ 2023-1-3 14:56:12

      什么,万事都不简单

信息

ID
915
时间
1000ms
内存
128MiB
难度
4
标签
递交数
235
已通过
101
上传者