We're dividing 878336 by 40 
Let's see how many times 40 fits into 878336.

Let's proceed to step 1:
The number 40 fits into 8 0 times, leaving a remainder of 8.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 8, we get 8.
Grab the next digit (7) from the dividend, add it to 8, then carry on: 87 / 40

On to step 2:
40 can be fit into 87 2 times, resulting in a remainder of 7.
Use 2 as the next digit of our solution. 
Result so far: 2.0
If we subtract 80 from 87, we get 7.
Grab the next digit (8) from the dividend, add it to 7, then carry on: 78 / 40

Going ahead to step 3:
78 divided by 40 is 1 with a remainder of 38.
Put 1 as the next digit of the answer. 
Result so far: 21.0
If we take 40 away from 78, we end up with 38.
Fetch the next digit (3) from the dividend, attach it to 38 and continue: 383 / 40

Going ahead to step 4:
40 goes into 383 9 times with a remainder of 23.
The number 9 becomes the next digit in our result. 
Result so far: 219.0
Deduct 360 from 383 and we're left with 23.
Take the next digit (3) from the dividend and append it to 23, then repeat: 233 / 40

Step 5:
40 can be fit into 233 5 times, resulting in a remainder of 33.
The number 5 becomes the next digit in our result. 
Result so far: 2195.0
Deduct 200 from 233 and we're left with 33.
Append the next digit (6) from the dividend to 33 and continue with: 336 / 40

Advancing to step 6:
The number 40 fits into 336 8 times, leaving a remainder of 16.
Record the quotient 8 as the next digit in the result. 
Result so far: 21958.0
Subtract 320 from 336 to get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Going ahead to step 7:
40 can be fit into 160 4 times, resulting in a remainder of 0.
Put 4 as the next digit of the answer. 
Result so far: 21958.4
Deduct 160 from 160 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 8:
When dividing 0 by 40, we get 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 21958.4
If we take 0 away from 0, we end up with 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 9:
If we divide 0 by 40, we get 0 and a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 21958.4
Deduct 0 from 0 and we're left with 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 result is 21958.4 with a remainder of 0.0.