题解
2023-05-27 17:24:31
发布于:上海
11阅读
0回复
0点赞
#include<iostream>
#include<cmath>
using namespace std;
int pencil;
double num1,cash1;
double num2,cash2;
double num3,cash3;
int box1,box2,box3;
int money;
int main(){
cin>>pencil;
cin>>num1>>cash1;
cin>>num2>>cash2;
cin>>num3>>cash3;
box1=ceil(pencil/num1)*cash1;
box2=ceil(pencil/num2)*cash2;
box3=ceil(pencil/num3)*cash3;
money=min(min(box1,box2),box3);
cout<<money;
return 0;
}
这里空空如也
有帮助,赞一个