We divide 781089 by 40
We want to figure out the number of times 781089 can be divided by 40.

Moving on 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 subtract 0 from 7, we get 7.
Bring next digit (8) of the dividend behind the 7 and repeat the process: 78 / 40

Step 2:
40 can be fit into 78 1 times, resulting in a remainder of 38.
Write down 1 as next digit of the result. 
Result so far: 1.0
Deduct 40 from 78 and we're left with 38.
Fetch the next digit (1) from the dividend, attach it to 38 and continue: 381 / 40

On to step 3:
40 can be fit into 381 9 times, resulting in a remainder of 21.
The number 9 becomes the next digit in our result. 
Result so far: 19.0
If we subtract 360 from 381, we get 21.
Take the next digit (0) from the dividend and append it to 21, then repeat: 210 / 40

Let's proceed to step 4:
The number 40 fits into 210 5 times, leaving a remainder of 10.
Write down 5 as next digit of the result. 
Result so far: 195.0
If we subtract 200 from 210, we get 10.
Grab the next digit (8) from the dividend, add it to 10, then carry on: 108 / 40

Let's proceed to step 5:
108 divided by 40 is 2 with a remainder of 28.
The next digit of our result is 2. 
Result so far: 1952.0
Subtract 80 from 108 to get 28.
Take the next digit (9) from the dividend and append it to 28, then repeat: 289 / 40

Moving on to step 6:
40 goes into 289 7 times with a remainder of 9.
Put 7 as the next digit of the answer. 
Result so far: 19527.0
If we subtract 280 from 289, we get 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Going ahead to step 7:
When dividing 90 by 40, we get 2 with a remainder of 10.
Write down 2 as next digit of the result. 
Result so far: 19527.2
If we subtract 80 from 90, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Advancing to step 8:
40 can be fit into 100 2 times, resulting in a remainder of 20.
Put 2 as the next digit of the answer. 
Result so far: 19527.22
Subtract 80 from 100 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

After the division, we end up with 19527.22 and a remainder of 0.02.