You can't, it's part of the challenge. Train more. Your opponent has the same time as you btw.
Sometimes, the challenges have a quirk that makes the calculation easy, like there are only multiplications and a zero in the mix, or only one loop is relevant. Also, the size of the awaited answer is given, which helps sometimes.