We look at the division of 781170 by 40 
The aim is to understand the frequency of 40 in 781170.

Advancing to step 1:
40 can be fit into 7 0 times, resulting in a remainder of 7.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 7 to get 7.
Grab the next digit (8) from the dividend, add it to 7, then carry on: 78 / 40

Going ahead to step 2:
40 can be fit into 78 1 times, resulting in a remainder of 38.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtracting 40 from 78 leaves us with 38.
Fetch the next digit (1) from the dividend, attach it to 38 and continue: 381 / 40

Advancing to step 3:
If we divide 381 by 40, we get 9 and a remainder of 21.
The number 9 becomes the next digit in our result. 
Result so far: 19.0
Subtract 360 from 381 to get 21.
Take the next digit (1) from the dividend and append it to 21, then repeat: 211 / 40

Let's proceed to step 4:
40 goes into 211 5 times with a remainder of 11.
The next digit of our result is 5. 
Result so far: 195.0
If we subtract 200 from 211, we get 11.
Take the next digit (7) from the dividend and append it to 11, then repeat: 117 / 40

Step 5:
117 divided by 40 is 2 with a remainder of 37.
The number 2 becomes the next digit in our result. 
Result so far: 1952.0
If we take 80 away from 117, we end up with 37.
Grab the next digit (0) from the dividend, add it to 37, then carry on: 370 / 40

Moving on to step 6:
If we divide 370 by 40, we get 9 and a remainder of 10.
Record the quotient 9 as the next digit in the result. 
Result so far: 19529.0
Subtract 360 from 370 to 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 7:
When dividing 100 by 40, we get 2 with a remainder of 20.
The next digit of our result is 2. 
Result so far: 19529.2
Deduct 80 from 100 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.

Going ahead to step 8:
200 divided by 40 is 5 with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 19529.25
Deduct 200 from 200 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.

Let's proceed to step 9:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 19529.25
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.

Moving on to step 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 19529.25
The remainder is 0 after subtracting 0 from 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 19529.25 with a remainder of 0.0.