P1909
查看原帖
P1909
176454
飞友737ng楼主2020/10/23 19:50
#include <iostream>
#include<cmath>
using namespace std;
int main() {
float a,b,c,d,e,f,g,h,i,j;
cin>>a>>b>>c>>d>>e>>f>>g;
h=(ceil(a/b))*c;
i=(ceil(a/d))*e;
j=(ceil(a/f))*g;
if(h<i&&h<j){
    cout<<h<<endl;
}
else if(i<h&&i<j){
    cout<<i<<endl;
}
else if(j<i&&j<h){
    cout<<j<<endl;
}
else if(h==j==i){
    cout<<h<<endl;
}

    return 0;
} 


2020/10/23 19:50
加载中...