Creativity is often the result of great adversity. But in a roundabout way, you're right (but probably not in the way you think). See, by having fun, you're wasting time you should be spending solving the problem. Then just before the deadline, you miraculously solve the problem. Your fun beget your laziness,which beget your desperation,which beget your creativity.