|
- #include<iostream>
- #include<cmath>
- using namespace std;
- float n,a1,b1,c1,a2,b2,c2,a3,b3,c3;
- int minc=99999999;
- int main()
- {
- cin>>n;
- cin>>a1>>b1;
- cin>>a2>>b2;
- cin>>a3>>b3;
- c1=ceil(n/a1)*b1;
- c2=ceil(n/a2)*b2;
- c3=ceil(n/a3)*b3;
- if(c1<=minc)minc=c1;
- if(c2<=minc)minc=c2;
- if(c3<=minc)minc=c3;
- cout<<minc;
- return 0;
- }
复制代码 |
|