simprizza/README.md
2019-03-14 20:11:12 +01:00

584 B

simprizza

$ ./simprizza.py
Reduction in cents: 1295

Price 1 in cents: 1295
  Amount of orders at this price: 3

Price 2 (empty to finish): 1495
  Amount of orders at this price: 1

Price 3 (empty to finish): 

----------------

You got a reduction of 24%

 # | Normal price | Reduction price
---|--------------|----------------
 3 | €      12.95 | €          9.84
 1 | €      14.95 | €         11.36
---|--------------|----------------
 4 | €      53.80 | €         40.88
           You paid €         40.85
This solution has a bonus of 3¢ for the courier.