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.
Submitting an official solution before solving the problem yourself is a bannable offence.
Since mortadella prices are expressed in a nonstandardized format " dollars for 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 .
Comments