Unfortunately for Gollum Bilbo had heard that sort of thing before; and the answer was all around him anyway.
"Dark!" he said without even scratching his head or putting on his thinking cap.
"A box without hinges, key, or lid
Yet golden treasure inside is hid."