Your argument seems to imply that the only thing that an exam is possibly allowed to measure is ability to answer a question at some arbitrary point in time. It also separates the people with the wit to understand a bunch of topics in a span of 3 or 5 months, the ability to plan accordingly, enough self control, and some motivation to see the plan through from the ones that don't. That's not a bad thing, as diplomas are often used as a proxy not only for intelligence, but also for suitability to certain jobs.