-->
当前位置:首页 > 题库

PROGRAMMING:Delayed work

Luz5年前 (2021-05-10)题库500
You own a company that hires painters to paint houses. You can hire as many painters as
you want, but for every painter you hire, you have to pay X dollars (independent of how long the
painter works on the house). In addition, you have to pay a penalty of D · P dollars overall if it
takes D days to finish painting the house. This penalty does not depend on the number of painters
you hire; furthermore, even if the time taken is not a whole number of days, you are only penalized
for the exact time taken.
All painters paint at the same rate. One painter can finish painting the house in K days. The
painters cooperate so well that it will only take K/M days for M painters to finish painting the
house.
What is the minimum amount of money you will have to pay, including what you pay to the
painters and the cost penalty, to get a house painted?
You have a company that employs painters to paint the house. You can hire as many painters as you can, but for each artist you hire, you have to pay x dollars (independent of the artist's working time, and more importantly, even if the time spent is not the whole number of days, you will only be punished for the exact time spent. All painters paint at the same speed. A painter can finish painting a house in K days. T his painters cooperate very well, so painter M can finish the painting of the house in K / M days. What is the minimum amount you have to pay, including the amount you pay for the paint and the cost of the fine to get the house painted?
###Input format:
The input consists of a single line containing three space-separated integers K, P, and X (1 ≤
K, P, X ≤ 10,000).
Input consists of a single line containing three spaces separated integers K, P and X (1 ≤ K, P, X ≤ 10000).
###Output format:
Print, on a single line, the minimum cost to have the house painted, rounded and displayed to
exactly three decimal places.
Print, in one line, minimum cost to get the house painted, rounded and displayed accurately to three decimal places.
###Input example:
Here is a set of inputs. For example:
```in
31 41 59
```
###Output example:
The corresponding output is given here. For example:
```out
five hundred and forty-nine point two zero zero
```







answer:If there is no answer, please comment