"The brothers drink coffee in the restaurant."
Translation:Die Brüder trinken Kaffee im Restaurant.
That is grammatical but then you either stress the "in" or the "dem".
why would "in dem" be marked as being wrong? Its exactly the same as "im". IM is just shorter form.
As I said, the meaning is changed a little. "im" (unstressed) is neutral. As soon as you use "in dem", you either stress that they eat inside (as opposed to outside) or that the eat in that particular restaurant (and not in another).
But it's still correct isn't it? So it should still be marked as correct in my opinion.