Petro is an entrepreneur
Petro is a private entrepreneur who sells various candies. He has observed that some candies are extremely popular, while others have little to no demand.
Petro came up with the idea to create an assortment by mixing two types of candies: popular and unpopular. By combining different masses of each candy type, he created an assortment with a cost of A UAH per kilogram.
Given that popular candies cost P UAH/kg and unpopular candies cost N UAH/kg, along with the assortment price A, determine how many grams of popular candies are in the assortment.
Input Data
You will be provided with three real numbers: P, N, and A. These represent the price per kilogram of the popular candies, the unpopular candies, and the assortment, respectively.
Output Data
Output one real number rounded to one decimal place, which is the number of grams of popular candies in the assortment. If it is not possible to determine this, output -1.