📜  门|门CS 2011 |第 64 题

📅  最后修改于: 2021-09-24 06:32:06             🧑  作者: Mango

运输商每天收到相同数量的订单。目前,他有一些待发货的订单(积压)要发货。如果他使用 7 辆卡车,那么在第 4 天结束时他可以清除所有订单。或者,如果他只使用 3 辆卡车,那么所有订单都会在第 10 天结束时清除。最少需要多少辆卡车才能在第 5 天结束时没有挂单?

(一) 4
(乙) 5
(三) 6
(四) 7答案: (C)
解释:

Let each truck can take at most x units.  Let the daily order be y and let backlog be z.

7*4*x = 4y + z
3*10*x = 10y + z

We need value of (5y + z)/5 in terms of x.

We can get value of y by subtracting first from second
6y = 2x
y = x/3

We can get value of z by substituting  value of y in first equation
4y + z = 28x
4(x/3) + z = 28x
z = (80/3)x

So the value of (5y + z)/5 is 5*(x/3) + (80/3)x  which is 17/3

So almost 6 trucks needed.

这个问题的测验