Challenge from http://www.reddit.com/r/dailyprogrammer