0
Originally posted (and deleted) by @Tlink, which was most likely inspired from this StackoverFlow question.
Since it was a shame it got deleted, because it seemed like a good challenge in general, I figured I'd repost it with proper formatting and rules. (I've tried contacting @Tlink and gave per...