If you want to advertise for $x$ minutes during prime-time throughout the week and $y$ minutes during off-prime-times, then we have that
$$5x+3y = 200$$
Let us call the impact per minute during prime-time as $a$ and the impact per minute during off-prime-time as $b$. Then our goal is to maximize
$$ax+by \,\,\,\,\,\,\,\,\,\,\,\,\, (\star)$$ subject to the constraint $5x+3y = 200$ where $x,y \in \mathbb{Z}^+$. The solution to $5x+3y = 200$ for $x,y \in \mathbb{Z}^+$ is given by $$(x,y) = (3k+1,65-5k)$$where $k \in \{0,1,2,\ldots,13\}$.Hence, our goal is to maximize $$a(3k+1) + b(65-5k) = k(3a-5b) + a+65b$$ for $k \in \{0,1,2,\ldots,13\}$. Hence, if we have that the impact during the prime-time $a$ is greater than or equal to five-thirds the impact during the off-prime-times $b$ i.e. $a \geq \dfrac53 b$, then choose $k=13$ i.e. invest all your money for prime-time ads i.e. $(x,y) = (40,0)$, else invest most of the money during off-prime-time ads and the whatever little remains invest in prime-time ads i.e. $(x,y) = (1,65)$. This is what you get with a simple linear objective, $(\star)$, to maximize impact. You can do better if you have a better model for the impact during prime-times and off-prime-times.