We look at the division of 872842 by 40 
Let's see how many times 40 fits into 872842.

Let's proceed to step 1:
When dividing 8 by 40, we get 0 with a remainder of 8.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 8 after subtracting 0 from 8.
Take the next digit (7) from the dividend and append it to 8, then repeat: 87 / 40

Advancing to step 2:
40 can be fit into 87 2 times, resulting in a remainder of 7.
Put 2 as the next digit of the answer. 
Result so far: 2.0
Subtract 80 from 87 to get 7.
Bring next digit (2) of the dividend behind the 7 and repeat the process: 72 / 40

Going ahead to step 3:
40 goes into 72 1 times with a remainder of 32.
Write down 1 as next digit of the result. 
Result so far: 21.0
The remainder is 32 after subtracting 40 from 72.
Append the next digit (8) from the dividend to 32 and continue with: 328 / 40

Going ahead to step 4:
40 goes into 328 8 times with a remainder of 8.
Write down 8 as next digit of the result. 
Result so far: 218.0
Subtracting 320 from 328 leaves us with 8.
Append the next digit (4) from the dividend to 8 and continue with: 84 / 40

Advancing to step 5:
40 can be fit into 84 2 times, resulting in a remainder of 4.
Put 2 as the next digit of the answer. 
Result so far: 2182.0
Deduct 80 from 84 and we're left with 4.
Grab the next digit (2) from the dividend, add it to 4, then carry on: 42 / 40

Going ahead to step 6:
The number 40 fits into 42 1 times, leaving a remainder of 2.
The number 1 becomes the next digit in our result. 
Result so far: 21821.0
Subtract 40 from 42 to get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Advancing to step 7:
20 divided by 40 is 0 with a remainder of 20.
Record the quotient 0 as the next digit in the result. 
Result so far: 21821.0
The remainder is 20 after subtracting 0 from 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: 21821.05
Subtracting 200 from 200 leaves us 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:
The number 40 fits into 0 0 times, leaving a remainder of 0.
The next digit of our result is 0. 
Result so far: 21821.05
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.

Advancing to step 10:
40 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 21821.05
Subtract 0 from 0 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.

Our division results in 21821.05 with a remaining 0.0.