Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Drying
Description It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster. But the radiator is small, so it can hold only one thing at a time. Jane wants to perform drying in the minimal possible time. She asked you to write a program that will calculate the minimal time for a given set of clothes. There are Every minute Jane can select one thing to dry on the radiator. The radiator is very hot, so the amount of water in this thing decreases by The task is to minimize the total time of drying by means of using the radiator effectively. The drying process ends when all the clothes are dry. Input The first line contains a single integer a ≤ 10_{i}^{9}). The third line contains k (1 ≤ k ≤ 10^{9}).Output Output a single integer — the minimal possible number of minutes required to dry all clothes. Sample Input
Sample Output
Source Northeastern Europe 2005, Northern Subregion |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator