Your example would defeat even genetic algorithms! But maybe a quantum computer could do it. If not, then I think the computer must have some artificial intelligence at the level of a human. It could respond: "I will try to find you an answer but the question is a hard one and I may have to quit early. How many minutes should I spend on this task?".