Strategy lets you swap an algorithm at runtime by injecting an object
that implements a common interface, instead of branching inside the caller.
Implement PercentageDiscount (percent) and FlatDiscount
(amount_cents), both applying to a cart total in integer cents
(never floats — the classic reason real payment code avoids float money).NoDiscount is already done for you.
solve(orders) checks out each order dict {'total_cents':..., 'strategy': {...}}
through the matching strategy and returns the final totals.
Sample tests