#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int n;
double t, max = 0;
cin >> n;
int a[3], b[3];
double cost[3];
for (int i = 1; i < 4; i++)
{
cin >> a[i] >> b[i];
cost[i] = ceil(n * 1.0 / a[i]) * b[i];
}
for (int i = 1; i < 4; i++)
{
if (cost[i] > max)
{
max = cost[i];
}
}
int temp = int(max);
cout << temp;
}
这代码为什么会超时呢