Does the degree require 5 years to complete? Does the majority usually complete it in less years? Do you have some sort of life, financial, health problems/reasons etc that prevent you from displaying your full potential? Is the teaching staff incompetent?
If yes then, no you are not an idiot.
Otherwise, it's usually a motivation/discipline/mindset problem, a fundamental issue in your method of learning (or its efficiency) or misinterpreting the knowledge you've received up to now for on reason or another. Rarely is the reason a lack of intelligence.
However, despite the root of the problem, if you think it's problematic, you should search for a way to correct/improve your situation, not ponder on your lack or not of intelligence.