You gave more details than the phrase provided.
"In a room full of female cats (or dogs etc.) if one of them is male then you must use the masculine gender".
I have said this before but, even though it has been disputed by knowledgeable commenters on this board, I will say it again. Duo (if not French) assumes the masculine gender unless it is indicated that feminine is required. If you have the option of using either gender because there is no specific rule governing which gender should be applied then use the masculine because that is what Duo does.
That means when Duo uses the masculine form of chien or chat that means only that the dog or cat etc. was not known to be female and thus feminine was not specifically required. It does -not- mean that they were male. Only that they were not known to be female.
You said they were specifically male which indicated that you believe that the use of the masculine form requires that the dog and cat be male, so they marked you wrong.
Duo uses gender and marks on the basis that since there are only the masculine and feminine genders, one of those has to take on the role of unknown gender. Duo has assigned the role of mixed or unknown gender to masculine. (I believe this to be true of French as well but native French speakers have posted that this is not true, at least where they live.)
To keep your hearts with Duo:
le/ les chien/s ..... (male, mixed, unknown) dog/s
la/ les chienne/s ....(female) dog/s
When both are given as multiple choice answers, and it states "multiple answers may be correct," it's confusing to mark one wrong. If I was translating the sentence, I'd write "We have a cat and a dog," but "We have a dog and a cat" is still a valid translation of the sentence ... right? Is this silly? I can't tell.