Sharing is Caring

Published by Werdna in

Given a list of numbers, create a function that removes 25% from every number in the list except the smallest number, and adds the total amount removed to the smallest number.

Examples

showTheLove([4, 1, 4]) ➞ [3, 3, 3]

showTheLove([16, 10, 8]) ➞ [12, 7.5, 14.5]

showTheLove([2, 100]) ➞ [27, 75]

Notes

There will only be one smallest number in a given list.

Watch a quick demo on how Edabit works.