Problem E
Innstunguvesen
Languages
en
is
Students have run into a problem in a computer science lecture at the University of Iceland. Everyone has a laptop, but the lecture hall only has one wall outlet. The students are willing to share this outlet, but some students doubt that one outlet is enough for the whole lecture. Can you determine if this is true? The students can swap the charger in the outlet so quickly the you may assume they do so instantaneously.
Input
The first line of the input contains two numbers, an integer
Output
Print how much time passes until the first computer will
necessarily run out of charge. An answer is considered correct
if the absolute or relative error is less than
Sample Input 1 | Sample Output 1 |
---|---|
3 1 4 4 4 |
12 |
Sample Input 2 | Sample Output 2 |
---|---|
3 3 1 2 3 |
Endalaust rafmagn |