Using 1, 2, 3, 4, 5, 6, 7, 8 to form two four-digit numbers, what is the minimum difference between the two four-digit numbers?
用1，2，3，4，5，6，7，8组成两个四位数，这两个四位数的差最小是多少．
<gadget id="calculator">5_123 - 4_876</gadget>
<output>247</output>

<result>247</result>