8 1- 18=63 63-36=27 72-27=45 54-45=9
5 1- 15=36 63-36=27 72-27=45 54-45=9
52-25=27 72-27=45 54-45=9
……
So the password for the first door is 9.
Password for the second door: 495
972-279=693 963-369=594 954-459=495
32 1- 123=98 1 98 1- 189=792 972-279=693 963-369=594 954-459=495
74 1- 147=594 954-459=495
……
370-307=423 432-234= 198 98 1- 189=792 972-279=693 963-369=594 954-459=495
Some Baidu searches say that the second password is 18, on the grounds that the sum of all the numbers is 18 every time.
Such as 693,594,981,792, ...
This answer is untenable: 370-307=423 840-408=432(4+2+3=9 instead of 18),
320-203= 1 17( 1+ 1+7=9),5 10- 105=405(4+5=9)
……
If the answer is 495, there is no counterexample yet.