I'd like to refer you to this question and answer: Is the hit die supposed to be rolled.
Monsters can sometimes use shortcuts.
Often, it is impractical to roll the HP for every individual monster.
While they technically use the same rules [as player characters], it is also acceptable to
use an average amount of HP for them without rolling. The Monster
Manuals automatically give you what this amount would be in
parentheses for your convenience. If you don't feel like rolling,
simply use these amounts for all monsters.
And also this question and answer: Why is a dice roll required when doing a creature HP check?
The dice roll is to determine how many HP a particular creature has,
since it makes sense that they're not all identical. However, when it
appears after a number of HP that means it has already been rolled for
you, and the roll is just there for informational value.
Whilst unfortunately I have no proof, I do agree with Erik that it looks like it ought to have a 34HP average, rather than 24HP and this is just a typo. This would make it consistent with the Small and Large elementals.
I would recommend discussing this with your GM and hopefully agreeing on 34HP as being the correct value.