We're dividing 787046 by 40 
We want to figure out the number of times 787046 can be divided by 40.

Let's proceed to step 1:
If we divide 7 by 40, we get 0 and a remainder of 7.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 7, we end up with 7.
Take the next digit (8) from the dividend and append it to 7, then repeat: 78 / 40

Moving on to step 2:
40 can be fit into 78 1 times, resulting in a remainder of 38.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
If we take 40 away from 78, we end up with 38.
Grab the next digit (7) from the dividend, add it to 38, then carry on: 387 / 40

Moving on to step 3:
The number 40 fits into 387 9 times, leaving a remainder of 27.
Use 9 as the next digit of our solution. 
Result so far: 19.0
If we subtract 360 from 387, we get 27.
Bring next digit (0) of the dividend behind the 27 and repeat the process: 270 / 40

Moving on to step 4:
40 goes into 270 6 times with a remainder of 30.
The next digit of our result is 6. 
Result so far: 196.0
Subtracting 240 from 270 leaves us with 30.
Append the next digit (4) from the dividend to 30 and continue with: 304 / 40

Moving on to step 5:
40 can be fit into 304 7 times, resulting in a remainder of 24.
The next digit of our result is 7. 
Result so far: 1967.0
If we take 280 away from 304, we end up with 24.
Include the next digit (6) from the dividend after 24, then repeat: 246 / 40

Advancing to step 6:
40 goes into 246 6 times with a remainder of 6.
Use 6 as the next digit of our solution. 
Result so far: 19676.0
Subtracting 240 from 246 leaves us with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Advancing to step 7:
40 can be fit into 60 1 times, resulting in a remainder of 20.
The next digit of our result is 1. 
Result so far: 19676.1
Deduct 40 from 60 and we're left with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Going ahead to step 8:
200 divided by 40 is 5 with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 19676.15
Subtract 200 from 200 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 9:
If we divide 0 by 40, we get 0 and a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 19676.15
If we subtract 0 from 0, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
The next digit of our result is 0. 
Result so far: 19676.15
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The final outcome is 19676.15, with a leftover of 0.0.