79分求助
查看原帖
79分求助
749219
Eva_91418楼主2023/8/29 09:10
#include<iostream>
using namespace std;
int main()
{
long long n,a,b,c,d,e,f,one,two,three,x,y,z;
cin>>n;
cin>>a>>b;
cin>>c>>d;
cin>>e>>f;
if(n%a==0)
    one=n/a;
else
    one=n/a+1;
if(n%c==0)
    two=n/c;
else
    two=n/c+1;
if(n%e==0)
    three=n/e;
else
    three=n/e+1;
x=one*b;
y=two*d;
z=three*f;
if(x>y)
    cout<<y;
else
    if(x>z)
        cout<<z;
    else
        cout<<x;
return 0;
}
2023/8/29 09:10
加载中...