1. Life, the Universe, and Everything

http://www.spoj.com/problems/TEST/