If someone gives you an elegant solution for a problem you had, say:
"Thanks! I knew it had to be really simple"!