125 - Hostel Meal (II)
Hostel Meal (II)
Time Limit: 1 sec
In a hostel S1 students have food for D1 days. After D2 days S2 more students joined the hostel. How many days will the ramaining food last ?
if S1 = 500, D1 = 50, D2 = 10 and S2 = 300 then
food will last 25 days
The input file contains only 4 integer numbers S1, D1, D2, S2 (S1, D1, D2, S2<=1000).
Output will show the one integer number which is the days food will last in a separate line.
500 50 10 300
Problem Setter: Shahin ShamS