We look at the division of 393945 by 31 
Let's see how many times 31 fits into 393945.

Going ahead to step 1:
The number 31 fits into 3 0 times, leaving a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 3 leaves us with 3.
Include the next digit (9) from the dividend after 3, then repeat: 39 / 31

Advancing to step 2:
39 divided by 31 is 1 with a remainder of 8.
The next digit of our result is 1. 
Result so far: 1.0
If we subtract 31 from 39, we get 8.
Fetch the next digit (3) from the dividend, attach it to 8 and continue: 83 / 31

Moving on to step 3:
31 goes into 83 2 times with a remainder of 21.
The next digit of our result is 2. 
Result so far: 12.0
Subtracting 62 from 83 leaves us with 21.
Take the next digit (9) from the dividend and append it to 21, then repeat: 219 / 31

Moving on to step 4:
If we divide 219 by 31, we get 7 and a remainder of 2.
The next digit of our result is 7. 
Result so far: 127.0
Subtracting 217 from 219 leaves us with 2.
Take the next digit (4) from the dividend and append it to 2, then repeat: 24 / 31

Advancing to step 5:
31 goes into 24 0 times with a remainder of 24.
Write down 0 as next digit of the result. 
Result so far: 1270.0
Subtract 0 from 24 to get 24.
Include the next digit (5) from the dividend after 24, then repeat: 245 / 31

Step 6:
31 can be fit into 245 7 times, resulting in a remainder of 28.
Put 7 as the next digit of the answer. 
Result so far: 12707.0
If we subtract 217 from 245, we get 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Moving on to step 7:
The number 31 fits into 280 9 times, leaving a remainder of 1.
The number 9 becomes the next digit in our result. 
Result so far: 12707.9
Subtracting 279 from 280 leaves us with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Step 8:
The number 31 fits into 10 0 times, leaving a remainder of 10.
Record the quotient 0 as the next digit in the result. 
Result so far: 12707.9
If we subtract 0 from 10, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Moving on to step 9:
If we divide 100 by 31, we get 3 and a remainder of 7.
Write down 3 as next digit of the result. 
Result so far: 12707.903
Deduct 93 from 100 and we're left with 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Step 10:
When dividing 70 by 31, we get 2 with a remainder of 8.
Record the quotient 2 as the next digit in the result. 
Result so far: 12707.9032
Deduct 62 from 70 and we're left with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

On to step 11:
31 can be fit into 80 2 times, resulting in a remainder of 18.
The next digit of our result is 2. 
Result so far: 12707.90322
The remainder is 18 after subtracting 62 from 80.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

In conclusion, the division gives 12707.90322 with a balance of 1.8e-05.