46pts求助
查看原帖
46pts求助
1394418
yjy_fywy楼主2024/9/20 19:56

只能想到这种方法了

#include <iostream>
#include <iomanip>
#include <cmath>
#include <bits/stdc++.h>
using namespace std;
int main(){
int a1,a2,b1,b2,c1,c2,q,qa,qb,qc;
cin>>q>>a1>>a2>>b1>>b2>>c1>>c2;
qa=q/a1+1,qb=q/b1+1,qc=q/c1+1;
cout<<min(min(qa*a2,qb*b2),qc*c2);
return 0;
}
2024/9/20 19:56
加载中...