← 返回 capitalone 的题目列表Minimum Batteries to Maintain Call
类型:online_judge
Starting with a phone at 0% charge, you need to use consecutive fully charged batteries to maintain a call for a specified time. You have a cyclic sequence of batteries, each lasting a certain conversation duration and taking a specific time to fully recharge. You can only use batteries from start to end in a cycle. Determine the minimum number of batteries needed, or return impossible if not feasible. Inputs include: 1) Total required call duration 2) Each battery's conversation duration 3) Full recharge duration.
Example
Input
120 30 5