Let's divide 40479861 by 789
We want to figure out the number of times 40479861 can be divided by 789.

Going ahead to step 1:
789 can be fit into 4 0 times, resulting in a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 4 after subtracting 0 from 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 789

Going ahead to step 2:
40 divided by 789 is 0 with 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.
Bring next digit (4) of the dividend behind the 40 and repeat the process: 404 / 789

Step 3:
789 can be fit into 404 0 times, resulting in a remainder of 404.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 404 and we're left with 404.
Fetch the next digit (7) from the dividend, attach it to 404 and continue: 4047 / 789

Going ahead to step 4:
If we divide 4047 by 789, we get 5 and a remainder of 102.
Put 5 as the next digit of the answer. 
Result so far: 5.0
If we take 3945 away from 4047, we end up with 102.
Fetch the next digit (9) from the dividend, attach it to 102 and continue: 1029 / 789

Advancing to step 5:
If we divide 1029 by 789, we get 1 and a remainder of 240.
Record the quotient 1 as the next digit in the result. 
Result so far: 51.0
Subtracting 789 from 1029 leaves us with 240.
Include the next digit (8) from the dividend after 240, then repeat: 2408 / 789

Going ahead to step 6:
When dividing 2408 by 789, we get 3 with a remainder of 41.
The number 3 becomes the next digit in our result. 
Result so far: 513.0
Subtracting 2367 from 2408 leaves us with 41.
Bring next digit (6) of the dividend behind the 41 and repeat the process: 416 / 789

On to step 7:
789 goes into 416 0 times with a remainder of 416.
Put 0 as the next digit of the answer. 
Result so far: 5130.0
Deduct 0 from 416 and we're left with 416.
Append the next digit (1) from the dividend to 416 and continue with: 4161 / 789

On to step 8:
The number 789 fits into 4161 5 times, leaving a remainder of 216.
Record the quotient 5 as the next digit in the result. 
Result so far: 51305.0
The remainder is 216 after subtracting 3945 from 4161.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2160, and continue the process.

Moving on to step 9:
The number 789 fits into 2160 2 times, leaving a remainder of 582.
Record the quotient 2 as the next digit in the result. 
Result so far: 51305.2
Subtracting 1578 from 2160 leaves us with 582.
Since there are no more digits in the dividend, we add a zero to the remainder making it 5820, and continue the process.

Moving on to step 10:
789 goes into 5820 7 times with a remainder of 297.
Put 7 as the next digit of the answer. 
Result so far: 51305.27
The remainder is 297 after subtracting 5523 from 5820.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2970, and continue the process.

Going ahead to step 11:
789 goes into 2970 3 times with a remainder of 603.
Record the quotient 3 as the next digit in the result. 
Result so far: 51305.273
Deduct 2367 from 2970 and we're left with 603.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6030, and continue the process.

Advancing to step 12:
789 can be fit into 6030 7 times, resulting in a remainder of 507.
Put 7 as the next digit of the answer. 
Result so far: 51305.2737
If we take 5523 away from 6030, we end up with 507.
Since there are no more digits in the dividend, we add a zero to the remainder making it 5070, and continue the process.

Advancing to step 13:
If we divide 5070 by 789, we get 6 and a remainder of 336.
Record the quotient 6 as the next digit in the result. 
Result so far: 51305.27376
Subtract 4734 from 5070 to get 336.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3360, and continue the process.

Let's proceed to step 14:
If we divide 3360 by 789, we get 4 and a remainder of 204.
The next digit of our result is 4. 
Result so far: 51305.273764
The remainder is 204 after subtracting 3156 from 3360.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2040, and continue the process.

Let's proceed to step 15:
The number 789 fits into 2040 2 times, leaving a remainder of 462.
Use 2 as the next digit of our solution. 
Result so far: 51305.2737642
Subtracting 1578 from 2040 leaves us with 462.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4620, and continue the process.

Let's proceed to step 16:
4620 divided by 789 is 5 with a remainder of 675.
Use 5 as the next digit of our solution. 
Result so far: 51305.27376425
Deduct 3945 from 4620 and we're left with 675.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6750, and continue the process.

The quotient of the division is 51305.27376425, and the remainder is 6.75e-07.