Problem Statement | |||||||||||||
*** You may only submit a given problem once - no resubmissions will be accepted. *** Salesmen and saleswomen often work for a commission. In other words, they get to keep a certain percentage of the sales they make. You have a saleswoman working for you who gets a whopping 20% commission, which cuts deep into your profit margins. You are considering replacing her with a cheaper salesman who will keep commission% of his sales. Out of each sale, cost% of the sale goes towards the cost of your products and other overhead. Your current saleswoman sells $sales of products a year. Your task is to determine how much the potential salesman would have to sell in a year to make you the same profit. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Notes | |||||||||||||
- | Your result must have relative or absolute error of less than 1e-9. | ||||||||||||
- | The commission is based on the gross sale, not the part of the sale that is above and beyond the cost. Therefore, if sales were $1000, your current saleswoman's commission would be $200. | ||||||||||||
- | Note that neither sales nor the return value need to be in whole cents. | ||||||||||||
Constraints | |||||||||||||
- | sales will be between 1 and 1e10, inclusive. | ||||||||||||
- | cost will be between 0.5 and 79.5, inclusive. | ||||||||||||
- | commission will be between 0.5 and 19.5, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
|