We divide 871030 by 40
The aim is to understand the frequency of 40 in 871030.

On to step 1:
When dividing 8 by 40, we get 0 with a remainder of 8.
Write down 0 as next digit of the result. 
Result so far: 0.0
Deduct 0 from 8 and we're left with 8.
Take the next digit (7) from the dividend and append it to 8, then repeat: 87 / 40

On 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
Deduct 80 from 87 and we're left with 7.
Take the next digit (1) from the dividend and append it to 7, then repeat: 71 / 40

Advancing to step 3:
The number 40 fits into 71 1 times, leaving a remainder of 31.
The number 1 becomes the next digit in our result. 
Result so far: 21.0
If we take 40 away from 71, we end up with 31.
Fetch the next digit (0) from the dividend, attach it to 31 and continue: 310 / 40

Step 4:
If we divide 310 by 40, we get 7 and a remainder of 30.
Write down 7 as next digit of the result. 
Result so far: 217.0
The remainder is 30 after subtracting 280 from 310.
Grab the next digit (3) from the dividend, add it to 30, then carry on: 303 / 40

On to step 5:
303 divided by 40 is 7 with a remainder of 23.
Put 7 as the next digit of the answer. 
Result so far: 2177.0
If we take 280 away from 303, we end up with 23.
Append the next digit (0) from the dividend to 23 and continue with: 230 / 40

Moving on to step 6:
The number 40 fits into 230 5 times, leaving a remainder of 30.
Use 5 as the next digit of our solution. 
Result so far: 21775.0
Deduct 200 from 230 and we're left 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.

Let's proceed to step 7:
40 goes into 300 7 times with a remainder of 20.
Put 7 as the next digit of the answer. 
Result so far: 21775.7
Deduct 280 from 300 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.

Advancing to step 8:
200 divided by 40 is 5 with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 21775.75
If we subtract 200 from 200, 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.

Moving on to step 9:
If we divide 0 by 40, we get 0 and a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 21775.75
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.

On to step 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 21775.75
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 21775.75 with a remainder of 0.0.