| CPUlm Winter Contest 2022 |
|---|
| Закончено |
In his first potion lesson Snape asked Harry: "Tell me, what would I get if I added powdered root of asphodel to an infusion of wormwood?". Back then, Harry had no idea what this meant and Snape had to explain to him that this would make a sleeping potion, so powerful that it is known as Draught of Living Death.
Now is Harry's sixth-year and his new professor, Slughorn, wants him and everyone else to brew exactly this potion. To no surprise, Harry is the one to brew it best, as he is the only one who knew that the final potion should contain exactly $$$p$$$ percent of powdered root of asphodel.
After the class is over, professor Slughorn decides to mix some of his students potions together to brew a perfect Draught of Living Death himself. His class consists of $$$n$$$ students, including Harry, and each of them attempted to brew the potion. Therefore, Professor Slughorn has access to $$$n$$$ potions, each in a different cauldron. The $$$i$$$th cauldron contains $$$c_i$$$ liters of potion in total and it contains $$$p_i$$$ percent of powdered root of asphodel. How many liters of the Draught of Living Death can Slughorn brew?
The input consists of:
Print a single real value, the maximal amount of Draught of Living Death that Slughorn can brew. Your solution is considered correct if the relative or absolute error is less than $$$10^{-4}$$$.
3 0.5 5 0.3 1 0.4 10 0.9
8.7500000000
3 0.5 5 0.3 1 0.4 1 0.9
3.5000000000
| Название |
|---|


