5. In how many ways can a pile of 100 stones be divided into heaps so that the number of stones in any two heaps differs by no more than one?
Answer: 99.

Solution: We will prove that for any $k$ from 2 to 100, the pile can be divided into $\mathrm{k}$ such piles in a unique way. $100 = q k + r$, where $q$ and $r$ are the quotient and remainder of 100 when divided by $k$, respectively. Suppose there is a pile with no more than $q-1$ stones, then in the remaining $k-1$ piles there are no fewer than $101 - q = q(k-1) + (r+1)$ stones. Then in some pile there are no fewer than $q+1$ stones, otherwise the number of stones in $k-1$ piles would not exceed $q(k-1)$, which is less than $q(k-1) + (r+1) = 101 - q$. Two piles have been found that do not meet the condition (one with no fewer than $q+1$ and one with no more than $q-1$). Contradiction. Suppose there is a pile with no fewer than $q+2$ stones. Then in the remaining $k-1$ piles there are no more than $99 - q$ stones. Then in some pile there are no more than $q$ stones, otherwise the number of stones in $k-1$ piles would be no less than $(k-1)(q+1) = (k q + k) - 1 - q > (k q + r) - 1 - q > 100 - 1 - q = 99 - q$. Two piles have been found where the number of stones differs by at least 2. Then in all piles there are $q$ or $q+1$ stones. Let the number of piles with $q$ stones be $t$, then the number of piles with $q+1$ stones is $k-t$, the total number of stones is $100 = q t + (q+1)(k-t) = q t + q k - q t + k - t = (q k + r) - r + k - t = 100 - r + k - t, t = k - r$, i.e., the method is unique.

Criteria: 1 point for the correct answer "99". 1 point for the answer "100" as well.