Close, But No Cigar

What does the idiom “Close, But No Cigar” mean?

Definition:

“You are very close but not quite correct.”

For example:

“Is the answer 49?’ —’Close, but no cigar!'”