Editorial for COCI '12 Contest 2 #1 Mortadela


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Since mortadella prices are expressed in a nonstandardized format "X dollars for Y grams", we should first convert them to a format that we can compare. One possible method is finding the price of a single gram of mortadella. It can be obtained by dividing the price by the mass. Finally, we have to find the minimum price of one gram and multiply it by 1000.


Comments

There are no comments at the moment.