Stock replenishment
Your task
A warehouse wants every product topped up to a minimum stock level. Given the current count of each product and the target level, return the total number of units to order: for each product below the target, add (target minus its count); products at or above the target need nothing. Example: counts [3, 7, 2] with target 5 needs 2 + 0 + 3 = 5 units.
Examples
restock_units(counts: list[int], target: int) -> intExample 1
Input
restock_units([3, 7, 2], 5)Output
5