求吊
查看原帖
求吊
1065089
cccccccsngbydmr楼主2024/3/1 23:36
#include <iostream>
using namespace std;
int main()
{
    double cost[10001]={0},b;
    int a;
    cin>>a;
    fill(cost+1,cost+151,0.4463);
    fill(cost+151,cost+401,0.4663);
    fill(cost+401,cost+10001,0.5663);
    for(int i=1;i<=a;i++)
       b+=cost[i];
    b=int((b*10)+0.5)/10.0;
    cout<<b<<endl;
    return 0;
}
2024/3/1 23:36
加载中...