Solution (source code)

= Solution

Choose upward <velocity> positive during ascent. Gravity and <linear drag> both point downward, giving the <linear differential equation>
$$
m\dot v=-mg-\alpha v,\qquad
v(t)=\left(v_0+\frac{mg}{\alpha}\right)e^{-\alpha t/m}-\frac{mg}{\alpha}.
$$
At the highest point $v=0$, so
$$
\boxed{t_{\max}=\frac m\alpha\log\left(1+\frac{\alpha v_0}{mg}\right).}
$$
The <vertical ascent under linear drag> time is smaller than $v_0/g$ for $\alpha>0$, because $\log(1+x)<x$. Its zero-drag <limit> is $v_0/g$, as required by constant-gravity <projectile motion>.