DWITE Online Computer Programming Contest
Sales! Sales! Sales!
You are to determine which item at a store, out of a group of three items which are on sale, offers the best discount as a percentage out of 100.
The input will contain data sets for five separate sales. Each sale will contain three pairs of data. Each pair will contain two lines, one for the regular price of an item and the other for the sales price of an item, in that order. The regular price will always be greater than the sales price.
The output will contain five lines of data, each representing the percentage discount of the item that offers the greatest discount. The percentage is displayed out of 100 (no percent sign needed), rounded to 3 decimal places, right justified in a field width of 7.
(only two sales given)
10.00 9.55 10.00 9.25 10.00 9.45 44.50 22.25 50.00 24.00 60.00 31.00
Point Value: 5
Time Limit: 1.00s
Memory Limit: 32M
Added: Mar 25, 2009
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3