Programming Challenge #136 from reddit.com/r/dailyprogrammer