Your school is going to start a new scholarship program. To apply for this scholarship you have to write an application and mention how much scholarship do you need. A lot of students applied for this scholarship and a few of them were selected. Just before issuing the scholarship, the accountant came to know that, the total budget allotment for scholarship has been reduced. So it’s not possible to offer the selected candidates their requested amount. Now if they offer some students less than their requested amount they will become sad. But the Head master wants to minimize the number of sad students. Your task is to write a program for the headmaster. The program will find such a number, that no students will be given more than that amount of money.
First line of input will have at most integers. These number represents the amount of money requested by each students. Second line will have the new allotted budget. Every number will be >= 0 and < .
Output will have a number, which is the maximum amount allotted budget for a single student. You have to print two digits after the decimal place.
100 2 50 120 1000 190
Note - for sample input. If we allot at most Tk. for each students, then total expense would be, . The student who applied for Tk. , he will be given Tk. only, no more than that.
Login to submit