龚治滔 • 15天前
using namespace std;
int main() {
int n;
scanf("%d", &n);
int a1, a2, b1, b2, c1, c2;
scanf("%d%d%d%d%d%d", &a1, &a2, &b1, &b2, &c1, &c2);
int s1 = (1.0 * n / a1) + 0.999999;
int s2 = (1.0 * n / b1) + 0.999999;
int s3 = (1.0 * n / c1) + 0.999999;
int d1 = (s1 * a2);
int d2 = (s2 * b2);
int d3 = (s3 * c2);
int ans = min(d1, d2);
int ans1 = min(ans, d3);
printf("%d", ans1);
return 0;
}
评论:
请先登录,才能进行评论