If the following is true:
Bear in mind that used as adjectives, the hundreds must agree with the noun they accompany:
Había veinte mil trescientas personas en el concierto.
There were twenty thousand three hundred people at the concert.
Then why is the following the opposite?
Ciento is invariable and doesn't have to agree with the noun it accompanies, for example:
Ciento treinta y cinco mil casas
One hundred and thirty-five thousand houses