题解
2023-05-27 17:17:22
发布于:上海
46阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 210;
LL n,m,k,t;
LL a[N];
double f[N][3],g[N];
int main(){
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
cin>>n;
f[0][0]=100.00,f[0][1]=0.00;
for(int i=1;i<=n;i++) cin>>a[i];
for(int i=1;i<=n;i++)
{
f[i][0]=max(f[i-1][0],f[i-1][1]/a[i]);
f[i][1]=max(f[i-1][1],f[i-1][0]*a[i]);
}
printf("%.2lf",f[n][0]);
return 0;
}
这里空空如也
有帮助,赞一个