We look at the division of 39797808 by 31 
We want to divide 39797808 by 31.

Step 1:
The number 31 fits into 3 0 times, leaving a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 3 leaves us with 3.
Grab the next digit (9) from the dividend, add it to 3, then carry on: 39 / 31

Moving on to step 2:
The number 31 fits into 39 1 times, leaving a remainder of 8.
The next digit of our result is 1. 
Result so far: 1.0
Deduct 31 from 39 and we're left with 8.
Append the next digit (7) from the dividend to 8 and continue with: 87 / 31

Step 3:
When dividing 87 by 31, we get 2 with a remainder of 25.
Record the quotient 2 as the next digit in the result. 
Result so far: 12.0
Deduct 62 from 87 and we're left with 25.
Include the next digit (9) from the dividend after 25, then repeat: 259 / 31

Moving on to step 4:
The number 31 fits into 259 8 times, leaving a remainder of 11.
Write down 8 as next digit of the result. 
Result so far: 128.0
The remainder is 11 after subtracting 248 from 259.
Append the next digit (7) from the dividend to 11 and continue with: 117 / 31

Step 5:
31 can be fit into 117 3 times, resulting in a remainder of 24.
Write down 3 as next digit of the result. 
Result so far: 1283.0
Deduct 93 from 117 and we're left with 24.
Grab the next digit (8) from the dividend, add it to 24, then carry on: 248 / 31

Moving on to step 6:
31 can be fit into 248 8 times, resulting in a remainder of 0.
Record the quotient 8 as the next digit in the result. 
Result so far: 12838.0
Subtract 248 from 248 to get 0.
Take the next digit (0) from the dividend and append it to 0, then repeat: 0 / 31

Step 7:
If we divide 0 by 31, we get 0 and a remainder of 0.
The next digit of our result is 0. 
Result so far: 128380.0
If we take 0 away from 0, we end up with 0.
Fetch the next digit (8) from the dividend, attach it to 0 and continue: 8 / 31

Advancing to step 8:
31 goes into 8 0 times with a remainder of 8.
The next digit of our result is 0. 
Result so far: 1283800.0
The remainder is 8 after subtracting 0 from 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Going ahead to step 9:
When dividing 80 by 31, we get 2 with a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 1283800.2
If we subtract 62 from 80, we get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

On to step 10:
31 goes into 180 5 times with a remainder of 25.
Put 5 as the next digit of the answer. 
Result so far: 1283800.25
If we subtract 155 from 180, we get 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

On to step 11:
If we divide 250 by 31, we get 8 and a remainder of 2.
Write down 8 as next digit of the result. 
Result so far: 1283800.258
The remainder is 2 after subtracting 248 from 250.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Advancing to step 12:
20 divided by 31 is 0 with a remainder of 20.
Put 0 as the next digit of the answer. 
Result so far: 1283800.258
Subtract 0 from 20 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Moving on to step 13:
200 divided by 31 is 6 with a remainder of 14.
The number 6 becomes the next digit in our result. 
Result so far: 1283800.25806
Subtract 186 from 200 to get 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Moving on to step 14:
140 divided by 31 is 4 with a remainder of 16.
The number 4 becomes the next digit in our result. 
Result so far: 1283800.258064
The remainder is 16 after subtracting 124 from 140.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

On to step 15:
31 goes into 160 5 times with a remainder of 5.
Record the quotient 5 as the next digit in the result. 
Result so far: 1283800.2580645
Subtract 155 from 160 to get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Moving on to step 16:
When dividing 50 by 31, we get 1 with a remainder of 19.
Write down 1 as next digit of the result. 
Result so far: 1283800.25806451
Deduct 31 from 50 and we're left with 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Our division results in 1283800.25806451 with a remaining 1.9e-08.