So did they lie in their answers or did they tell the truth as they see it (which would have meant failing the exam)? Aren't they members of a religion with an injunction against false witness?
They figured the false witness was what the teacher was telling them. Just because you learn the answers doesn't necessarily mean you have to believe them.