P1004 cows and pasture

Title Description

There is a ranch, pasture grass growth per day are uniform, this pasture for \ (A \) cattle eat \ (B \) days, or alternatively \ (C \) cattle eat \ (D \) days, then the amount of grass on the ranch newborn every day for up to a few head of cattle to eat one day?

Input Format

Input contains four integers \ (A, B, C, D (. 1 \ Le A, B, C, D \ Le 1000, A \ lt C, A \ B CDOT \ gt C \ CDOT D) \) .

Output Format

Output An integer amount indicates how many head of cattle pasture grass newborn eat every day for up to one day.

Sample input

15 20 20 10

Sample Output

10

Guess you like

Origin www.cnblogs.com/problems/p/11758235.html