Pode haver uma história com este tema, mas O sexto palácio de Robert Silverberg se encaixa na descrição.
There was the treasure and there was the guardian of the treasure. And there were the whitening bones of those who had tried in vain to make the treasure their own.
O guardião faz perguntas aos desafiantes ...
It might demand the proofs of mathematical theorems. It might ask the translations of strange words. So they gathered, from their knowledge of what had befallen other men here. And, so it seemed, to give a wrong answer was to earn instant death.