# Inspired by Romain Bouchard

Algebra Level 3

Let $a_1,a_2,...,a_n$ be distinct positive integers such that $a_1+a_2+\cdots+a_n=2018.$

Find the maximum value of $a_1\times a_2\times \cdots \times a_n.$

If this is equal to $\frac{a!}{b}$, where $a$ and $b$ are distinct positive integers and $a+b$ is minimized, write your answer as $\frac{ab}{2}.$

×