Is being good at mathematic contests necessary to pursue a career in mathematics or physics? I am extremely poor in solving a problem quickly, which leaves me doing badly in olympiads and other contests. But, if I just don’t give up on a problem, no matter how much time it takes, I usually end up solving it. To have a future in mathematics or physics, is it necessary for me to excel at contests, because these days children excelling at contests have an advantage over those who don’t (not complete advantage, but advantage nonetheless)?
Mathematics takes place at different time-scales.  If you can solve a problem in $5$ minutes that others need an hour to solve, you can probably get a good job.  If you can solve a problem in a month that others might need a year to solve, you will probably do well as a graduate student.  But if you can solve a problem in $10$ years that nobody else can solve in a lifetime, you could be a great mathematician.
Solving "exercises" that just require formulaic application of pre-learned tricks (as is the case in most of these contests) quickly or not will likely have very little bearing on any future that you might have in mathematics.  I would suggest reading "A Mathematician's Lament" by Paul Lockhart (https://www.maa.org/external_archive/devlin/LockhartsLament.pdf) if you want to hear a little bit more (targeted at the educated layperson) about how the "mathematics" that you have been exposed to in school is very different from what mathematicians engage in.