slabs

CF

Discount Slabs

A shop has given discounts based on the price of purchase. There are N slabs. When the price falls between two slabs that is ith slab amount…