We look at the division of 313791 by 39 
Our goal is to divide 313791 by 39.

Going ahead to step 1:
When dividing 3 by 39, we get 0 with a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 3, we end up with 3.
Bring next digit (1) of the dividend behind the 3 and repeat the process: 31 / 39

Step 2:
39 goes into 31 0 times with a remainder of 31.
Write down 0 as next digit of the result. 
Result so far: 0.0
Deduct 0 from 31 and we're left with 31.
Include the next digit (3) from the dividend after 31, then repeat: 313 / 39

Moving on to step 3:
If we divide 313 by 39, we get 8 and a remainder of 1.
The next digit of our result is 8. 
Result so far: 8.0
Subtract 312 from 313 to get 1.
Grab the next digit (7) from the dividend, add it to 1, then carry on: 17 / 39

Advancing to step 4:
If we divide 17 by 39, we get 0 and a remainder of 17.
Use 0 as the next digit of our solution. 
Result so far: 80.0
The remainder is 17 after subtracting 0 from 17.
Include the next digit (9) from the dividend after 17, then repeat: 179 / 39

Step 5:
39 goes into 179 4 times with a remainder of 23.
Use 4 as the next digit of our solution. 
Result so far: 804.0
Subtracting 156 from 179 leaves us with 23.
Bring next digit (1) of the dividend behind the 23 and repeat the process: 231 / 39

Step 6:
If we divide 231 by 39, we get 5 and a remainder of 36.
The number 5 becomes the next digit in our result. 
Result so far: 8045.0
Deduct 195 from 231 and we're left with 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

Moving on to step 7:
360 divided by 39 is 9 with a remainder of 9.
The next digit of our result is 9. 
Result so far: 8045.9
Subtracting 351 from 360 leaves us with 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Step 8:
90 divided by 39 is 2 with a remainder of 12.
Use 2 as the next digit of our solution. 
Result so far: 8045.92
Subtracting 78 from 90 leaves us with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Going ahead to step 9:
The number 39 fits into 120 3 times, leaving a remainder of 3.
Write down 3 as next digit of the result. 
Result so far: 8045.923
If we subtract 117 from 120, we get 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Step 10:
39 can be fit into 30 0 times, resulting in a remainder of 30.
The next digit of our result is 0. 
Result so far: 8045.923
Subtracting 0 from 30 leaves us with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

On to step 11:
300 divided by 39 is 7 with a remainder of 27.
Record the quotient 7 as the next digit in the result. 
Result so far: 8045.92307
The remainder is 27 after subtracting 273 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Let's proceed to step 12:
39 goes into 270 6 times with a remainder of 36.
Write down 6 as next digit of the result. 
Result so far: 8045.923076
Subtracting 234 from 270 leaves us with 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

Let's proceed to step 13:
When dividing 360 by 39, we get 9 with a remainder of 9.
Write down 9 as next digit of the result. 
Result so far: 8045.9230769
Deduct 351 from 360 and we're left with 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Going ahead to step 14:
The number 39 fits into 90 2 times, leaving a remainder of 12.
The next digit of our result is 2. 
Result so far: 8045.92307692
The remainder is 12 after subtracting 78 from 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

After the division, we end up with 8045.92307692 and a remainder of 1.2e-08.