We look at the division of 39787709 by 166 
Our goal is to divide 39787709 by 166.

Let's proceed to step 1:
The number 166 fits into 3 0 times, leaving a remainder of 3.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Include the next digit (9) from the dividend after 3, then repeat: 39 / 166

Going ahead to step 2:
166 goes into 39 0 times with a remainder of 39.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 39, we end up with 39.
Grab the next digit (7) from the dividend, add it to 39, then carry on: 397 / 166

Let's proceed to step 3:
If we divide 397 by 166, we get 2 and a remainder of 65.
Write down 2 as next digit of the result. 
Result so far: 2.0
If we take 332 away from 397, we end up with 65.
Grab the next digit (8) from the dividend, add it to 65, then carry on: 658 / 166

On to step 4:
166 goes into 658 3 times with a remainder of 160.
Record the quotient 3 as the next digit in the result. 
Result so far: 23.0
The remainder is 160 after subtracting 498 from 658.
Include the next digit (7) from the dividend after 160, then repeat: 1607 / 166

Step 5:
1607 divided by 166 is 9 with a remainder of 113.
The next digit of our result is 9. 
Result so far: 239.0
Subtract 1494 from 1607 to get 113.
Append the next digit (7) from the dividend to 113 and continue with: 1137 / 166

Step 6:
If we divide 1137 by 166, we get 6 and a remainder of 141.
Record the quotient 6 as the next digit in the result. 
Result so far: 2396.0
The remainder is 141 after subtracting 996 from 1137.
Append the next digit (0) from the dividend to 141 and continue with: 1410 / 166

Step 7:
166 goes into 1410 8 times with a remainder of 82.
The next digit of our result is 8. 
Result so far: 23968.0
If we subtract 1328 from 1410, we get 82.
Fetch the next digit (9) from the dividend, attach it to 82 and continue: 829 / 166

Let's proceed to step 8:
166 goes into 829 4 times with a remainder of 165.
The number 4 becomes the next digit in our result. 
Result so far: 239684.0
If we take 664 away from 829, we end up with 165.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1650, and continue the process.

Going ahead to step 9:
166 goes into 1650 9 times with a remainder of 156.
The next digit of our result is 9. 
Result so far: 239684.9
Subtract 1494 from 1650 to get 156.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1560, and continue the process.

Advancing to step 10:
The number 166 fits into 1560 9 times, leaving a remainder of 66.
The number 9 becomes the next digit in our result. 
Result so far: 239684.99
Deduct 1494 from 1560 and we're left with 66.
Since there are no more digits in the dividend, we add a zero to the remainder making it 660, and continue the process.

The final result is 239684.99 with a remainder of 0.066.