5 条题解
-
0
#include《iostream》//cin,cout #include《iomanip》 //cout<<fixed<<setprecision(n){位数保留} using namespace std; float x,sum; int a; int main() { cin>>x>>a; for(int j=a;j>=0;j--) { sum+=pow(x,j); } cout<<fixed<<setprecision(2)<<endl<<endl<<endl<<endl<<endl; cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<sum; return 0; } //dongliyang6666666666666666666skhjkfgjgkjhfgjDV
-
0
#include <string.h> #include <queue> #include <math.h> #include <vector> #include <algorithm> #include <iomanip> #include <stack> #include<cstring> #include <bits/stdc++.h> using namespace std; double x,ans=0,d; int n; int main(){ cin>>x>>n; for ( int i=n ; i>=1; i--){ ans+=pow(x,i); } d=ans+1; cout << fixed<<setprecision(2)<<d; return 0; } #
-
0
#include <stdio.h> #include <string.h> #include <queue> #include <math.h> #include <vector> #include <algorithm> #include <iomanip> #include <stack> #include<cstring> #include <bits/stdc++.h> using namespace std; double x,ans=0,d; int n; int main(){ cin>>x>>n; for ( int i=n ; i>=1; i--){ ans+=pow(x,i); } d=ans+1; cout << fixed<<setprecision(2)<<d; return 0; } #
- 1
信息
- ID
- 915
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 4
- 标签
- 递交数
- 238
- 已通过
- 103
- 上传者