Let's divide 877315 by 40
Our goal is to divide 877315 by 40.

Moving on to step 1:
40 goes into 8 0 times with a remainder of 8.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 8, we get 8.
Bring next digit (7) of the dividend behind the 8 and repeat the process: 87 / 40

Going ahead to step 2:
40 goes into 87 2 times with a remainder of 7.
Write down 2 as next digit of the result. 
Result so far: 2.0
The remainder is 7 after subtracting 80 from 87.
Include the next digit (7) from the dividend after 7, then repeat: 77 / 40

Going ahead to step 3:
If we divide 77 by 40, we get 1 and a remainder of 37.
The number 1 becomes the next digit in our result. 
Result so far: 21.0
Deduct 40 from 77 and we're left with 37.
Bring next digit (3) of the dividend behind the 37 and repeat the process: 373 / 40

On to step 4:
The number 40 fits into 373 9 times, leaving a remainder of 13.
Use 9 as the next digit of our solution. 
Result so far: 219.0
Subtracting 360 from 373 leaves us with 13.
Bring next digit (1) of the dividend behind the 13 and repeat the process: 131 / 40

Advancing to step 5:
When dividing 131 by 40, we get 3 with a remainder of 11.
Use 3 as the next digit of our solution. 
Result so far: 2193.0
Deduct 120 from 131 and we're left with 11.
Bring next digit (5) of the dividend behind the 11 and repeat the process: 115 / 40

Moving on to step 6:
When dividing 115 by 40, we get 2 with a remainder of 35.
Use 2 as the next digit of our solution. 
Result so far: 21932.0
If we take 80 away from 115, we end up with 35.
Since there are no more digits in the dividend, we add a zero to the remainder making it 350, and continue the process.

On to step 7:
40 goes into 350 8 times with a remainder of 30.
Write down 8 as next digit of the result. 
Result so far: 21932.8
If we take 320 away from 350, we end up with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 8:
300 divided by 40 is 7 with a remainder of 20.
Put 7 as the next digit of the answer. 
Result so far: 21932.87
If we take 280 away from 300, we end up 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.

On to step 9:
The number 40 fits into 200 5 times, leaving a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 21932.875
If we take 200 away from 200, 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:
When dividing 0 by 40, we get 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 21932.875
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.

Moving on to step 11:
0 divided by 40 is 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 21932.875
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.

After the division, we end up with 21932.875 and a remainder of 0.0.