I'm sure you know about the $9.99 price scheme, instead of using $10. Well, in your new job as a sys admin at a large retail store, they want prices to adhere to a similar scheme:
- All prices are in whole dollars, no cents.
- All prices should end with 5 or 9, rounding to the closest but up if the last digit is right between 5 and 9. (Applies to last digit 2 and 7)
- Lowest input is $1, and the lowest outputted price should be $5.
Your input is a list of integers:
12 8 41 27 144 99 3
And the output should a list of the new prices. In the above case:
15 9 39 29 145 99 5