40789021 ÷ 391 
Let's see how many times 391 fits into 40789021.

Moving on to step 1:
391 goes into 4 0 times with a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 4 to get 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 391

Advancing to step 2:
391 goes into 40 0 times with a remainder of 40.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 40 after subtracting 0 from 40.
Bring next digit (7) of the dividend behind the 40 and repeat the process: 407 / 391

On to step 3:
391 can be fit into 407 1 times, resulting in a remainder of 16.
Put 1 as the next digit of the answer. 
Result so far: 1.0
If we take 391 away from 407, we end up with 16.
Fetch the next digit (8) from the dividend, attach it to 16 and continue: 168 / 391

Going ahead to step 4:
If we divide 168 by 391, we get 0 and a remainder of 168.
Record the quotient 0 as the next digit in the result. 
Result so far: 10.0
If we take 0 away from 168, we end up with 168.
Include the next digit (9) from the dividend after 168, then repeat: 1689 / 391

On to step 5:
391 goes into 1689 4 times with a remainder of 125.
Write down 4 as next digit of the result. 
Result so far: 104.0
If we subtract 1564 from 1689, we get 125.
Include the next digit (0) from the dividend after 125, then repeat: 1250 / 391

Moving on to step 6:
391 goes into 1250 3 times with a remainder of 77.
Put 3 as the next digit of the answer. 
Result so far: 1043.0
Subtracting 1173 from 1250 leaves us with 77.
Take the next digit (2) from the dividend and append it to 77, then repeat: 772 / 391

Going ahead to step 7:
391 can be fit into 772 1 times, resulting in a remainder of 381.
The number 1 becomes the next digit in our result. 
Result so far: 10431.0
The remainder is 381 after subtracting 391 from 772.
Take the next digit (1) from the dividend and append it to 381, then repeat: 3811 / 391

Step 8:
The number 391 fits into 3811 9 times, leaving a remainder of 292.
Record the quotient 9 as the next digit in the result. 
Result so far: 104319.0
Subtracting 3519 from 3811 leaves us with 292.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2920, and continue the process.

Step 9:
The number 391 fits into 2920 7 times, leaving a remainder of 183.
Use 7 as the next digit of our solution. 
Result so far: 104319.7
If we take 2737 away from 2920, we end up with 183.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1830, and continue the process.

Let's proceed to step 10:
The number 391 fits into 1830 4 times, leaving a remainder of 266.
Write down 4 as next digit of the result. 
Result so far: 104319.74
Subtracting 1564 from 1830 leaves us with 266.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2660, and continue the process.

Moving on to step 11:
391 goes into 2660 6 times with a remainder of 314.
Write down 6 as next digit of the result. 
Result so far: 104319.746
If we take 2346 away from 2660, we end up with 314.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3140, and continue the process.

Let's proceed to step 12:
The number 391 fits into 3140 8 times, leaving a remainder of 12.
Record the quotient 8 as the next digit in the result. 
Result so far: 104319.7468
If we subtract 3128 from 3140, we get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

On to step 13:
120 divided by 391 is 0 with a remainder of 120.
Write down 0 as next digit of the result. 
Result so far: 104319.7468
Subtracting 0 from 120 leaves us with 120.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1200, and continue the process.

Advancing to step 14:
391 goes into 1200 3 times with a remainder of 27.
Record the quotient 3 as the next digit in the result. 
Result so far: 104319.746803
Deduct 1173 from 1200 and we're left with 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

On to step 15:
270 divided by 391 is 0 with a remainder of 270.
The next digit of our result is 0. 
Result so far: 104319.746803
If we take 0 away from 270, we end up with 270.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2700, and continue the process.

Advancing to step 16:
391 goes into 2700 6 times with a remainder of 354.
Use 6 as the next digit of our solution. 
Result so far: 104319.74680306
Subtract 2346 from 2700 to get 354.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3540, and continue the process.

After the division, we end up with 104319.74680306 and a remainder of 3.54e-07.