Choose the Cheapest SKU Promotion

Given an SKU's ordered quantity and unit price, along with multiple optional promotions, compute the minimum payable amount when using exactly one promotion.

A promotion has one of the following ...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: