Solution (source code)

= Solution

Since $Y=\int_0^\infty\mathbf1_{\{Y\ge y\}}\,dy$, Tonelli's theorem gives
$$
\mathbb E Y=\int_0^\infty\mathbb P(Y\ge y)\,dy.
$$
For the integer-valued minimum,
$$
\mathbb E M=\sum_{k=1}^n\mathbb P(M\ge k)
=\sum_{j=0}^{n-1}\left(1-\frac jn\right)^n
\le\sum_{j=0}^\infty e^{-j}=\frac e{e-1}<e.
$$
Markov's inequality now gives
$$
\boxed{\mathbb P(M\ge6)\le\frac{\mathbb E M}{6}<\frac e6<\frac12.}
$$