We look at the division of 40740877 by 785 
We want to figure out the number of times 40740877 can be divided by 785.

Moving on to step 1:
When dividing 4 by 785, we get 0 with a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Grab the next digit (0) from the dividend, add it to 4, then carry on: 40 / 785

Going ahead to step 2:
785 can be fit into 40 0 times, resulting in a remainder of 40.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 40 after subtracting 0 from 40.
Append the next digit (7) from the dividend to 40 and continue with: 407 / 785

Going ahead to step 3:
785 can be fit into 407 0 times, resulting in a remainder of 407.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 407, we get 407.
Append the next digit (4) from the dividend to 407 and continue with: 4074 / 785

Going ahead to step 4:
785 can be fit into 4074 5 times, resulting in a remainder of 149.
Use 5 as the next digit of our solution. 
Result so far: 5.0
If we take 3925 away from 4074, we end up with 149.
Include the next digit (0) from the dividend after 149, then repeat: 1490 / 785

Moving on to step 5:
1490 divided by 785 is 1 with a remainder of 705.
The number 1 becomes the next digit in our result. 
Result so far: 51.0
Subtracting 785 from 1490 leaves us with 705.
Append the next digit (8) from the dividend to 705 and continue with: 7058 / 785

Moving on to step 6:
The number 785 fits into 7058 8 times, leaving a remainder of 778.
Record the quotient 8 as the next digit in the result. 
Result so far: 518.0
If we take 6280 away from 7058, we end up with 778.
Append the next digit (7) from the dividend to 778 and continue with: 7787 / 785

Step 7:
785 can be fit into 7787 9 times, resulting in a remainder of 722.
Put 9 as the next digit of the answer. 
Result so far: 5189.0
Subtracting 7065 from 7787 leaves us with 722.
Include the next digit (7) from the dividend after 722, then repeat: 7227 / 785

Advancing to step 8:
785 can be fit into 7227 9 times, resulting in a remainder of 162.
The next digit of our result is 9. 
Result so far: 51899.0
If we take 7065 away from 7227, we end up with 162.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1620, and continue the process.

Going ahead to step 9:
1620 divided by 785 is 2 with a remainder of 50.
Record the quotient 2 as the next digit in the result. 
Result so far: 51899.2
The remainder is 50 after subtracting 1570 from 1620.
Since there are no more digits in the dividend, we add a zero to the remainder making it 500, and continue the process.

On to step 10:
785 can be fit into 500 0 times, resulting in a remainder of 500.
The number 0 becomes the next digit in our result. 
Result so far: 51899.2
Subtracting 0 from 500 leaves us with 500.
Since there are no more digits in the dividend, we add a zero to the remainder making it 5000, and continue the process.

Moving on to step 11:
When dividing 5000 by 785, we get 6 with a remainder of 290.
The next digit of our result is 6. 
Result so far: 51899.206
Deduct 4710 from 5000 and we're left with 290.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2900, and continue the process.

On to step 12:
If we divide 2900 by 785, we get 3 and a remainder of 545.
Record the quotient 3 as the next digit in the result. 
Result so far: 51899.2063
Subtract 2355 from 2900 to get 545.
Since there are no more digits in the dividend, we add a zero to the remainder making it 5450, and continue the process.

Going ahead to step 13:
When dividing 5450 by 785, we get 6 with a remainder of 740.
Record the quotient 6 as the next digit in the result. 
Result so far: 51899.20636
If we subtract 4710 from 5450, we get 740.
Since there are no more digits in the dividend, we add a zero to the remainder making it 7400, and continue the process.

On to step 14:
The number 785 fits into 7400 9 times, leaving a remainder of 335.
Write down 9 as next digit of the result. 
Result so far: 51899.206369
If we subtract 7065 from 7400, we get 335.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3350, and continue the process.

Going ahead to step 15:
If we divide 3350 by 785, we get 4 and a remainder of 210.
The number 4 becomes the next digit in our result. 
Result so far: 51899.2063694
Deduct 3140 from 3350 and we're left with 210.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2100, and continue the process.

Moving on to step 16:
When dividing 2100 by 785, we get 2 with a remainder of 530.
The next digit of our result is 2. 
Result so far: 51899.20636942
The remainder is 530 after subtracting 1570 from 2100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 5300, and continue the process.

Our division results in 51899.20636942 with a remaining 5.3e-07.