Not a glitch.
Basically, if your answer is the number of Pokemon's Sinnoh Regional Dex entry, that Pokemon's cry will be heard. For example, my answer was 130. I would then hear Toxicroak's cry. So the answer to the equation you entered must have been Tropius' Dex entry number, 187.