5. Find the number of 9-digit numbers in which each digit from 1 to 9 appears exactly once, the digits 1, 2, 3, 4, 5 are arranged in ascending order, and the digit 6 appears before the digit 1 (for example, 916238457).
Answer: 504

Solution: Note that after arranging the digits $7,8,9$, the remaining digits are uniquely determined. Therefore, the number of such numbers is $7 \cdot 8 \cdot 9=504$.