When doing a subtraction problem, Dongdong wrote 5 for the 3 in the tens digit, and 7 for the 9 in the ones digit, and the difference was 831. What is the correct difference?
在做一道减法题时，冬冬把减数十位上的3错写成了5，个位上的9错写成了7，所得的差是831．正确的差应是多少？
<gadget id="calculator">50 - 30</gadget>
<output>20</output>

<gadget id="calculator">9 - 7</gadget>
<output>2</output>

<gadget id="calculator">20 - 2</gadget>
<output>18</output>

<gadget id="calculator">831 + 18</gadget>
<output>849</output>

<result>849</result>