Approach hintTry it first, then revealHide
For the largest number, put the biggest digit allowed at each position from the left. For the smallest, put the smallest digit that still lets the remaining positions reach the sum, never a leading 0. Treat s = 0 separately.