I'm a programmer. Sometimes I solve a really hard programming problem in a clever way with very few lines of code, and I feel like I'm the smartest person in the world. Other times I can't solve a really simple problem and I realize that I'm actually a moron that gets lucky sometimes.
Sidenote: For what it's worth, I think you're pretty smart to solve things like that. I'm probably not as experienced as you, but it's kind of telling that I've never had that feeling of an elegant solution.