Let's divide 40388118 by 387
The aim is to understand the frequency of 387 in 40388118.

Advancing to step 1:
When dividing 4 by 387, we get 0 with a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 4 after subtracting 0 from 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 387

Moving on to step 2:
If we divide 40 by 387, we get 0 and a remainder of 40.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 40, we get 40.
Include the next digit (3) from the dividend after 40, then repeat: 403 / 387

Advancing to step 3:
If we divide 403 by 387, we get 1 and a remainder of 16.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Deduct 387 from 403 and we're left with 16.
Fetch the next digit (8) from the dividend, attach it to 16 and continue: 168 / 387

Moving on to step 4:
387 goes into 168 0 times with a remainder of 168.
Put 0 as the next digit of the answer. 
Result so far: 10.0
Subtracting 0 from 168 leaves us with 168.
Grab the next digit (8) from the dividend, add it to 168, then carry on: 1688 / 387

Moving on to step 5:
387 goes into 1688 4 times with a remainder of 140.
The number 4 becomes the next digit in our result. 
Result so far: 104.0
If we subtract 1548 from 1688, we get 140.
Include the next digit (1) from the dividend after 140, then repeat: 1401 / 387

Moving on to step 6:
1401 divided by 387 is 3 with a remainder of 240.
Record the quotient 3 as the next digit in the result. 
Result so far: 1043.0
Deduct 1161 from 1401 and we're left with 240.
Fetch the next digit (1) from the dividend, attach it to 240 and continue: 2401 / 387

Moving on to step 7:
If we divide 2401 by 387, we get 6 and a remainder of 79.
Use 6 as the next digit of our solution. 
Result so far: 10436.0
Subtract 2322 from 2401 to get 79.
Fetch the next digit (8) from the dividend, attach it to 79 and continue: 798 / 387

On to step 8:
If we divide 798 by 387, we get 2 and a remainder of 24.
Use 2 as the next digit of our solution. 
Result so far: 104362.0
The remainder is 24 after subtracting 774 from 798.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Step 9:
If we divide 240 by 387, we get 0 and a remainder of 240.
Use 0 as the next digit of our solution. 
Result so far: 104362.0
Subtracting 0 from 240 leaves us with 240.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2400, and continue the process.

Advancing to step 10:
When dividing 2400 by 387, we get 6 with a remainder of 78.
The next digit of our result is 6. 
Result so far: 104362.06
The remainder is 78 after subtracting 2322 from 2400.
Since there are no more digits in the dividend, we add a zero to the remainder making it 780, and continue the process.

Going ahead to step 11:
The number 387 fits into 780 2 times, leaving a remainder of 6.
Write down 2 as next digit of the result. 
Result so far: 104362.062
If we take 774 away from 780, we end up with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Step 12:
387 can be fit into 60 0 times, resulting in a remainder of 60.
Use 0 as the next digit of our solution. 
Result so far: 104362.062
Deduct 0 from 60 and we're left with 60.
Since there are no more digits in the dividend, we add a zero to the remainder making it 600, and continue the process.

Advancing to step 13:
The number 387 fits into 600 1 times, leaving a remainder of 213.
Write down 1 as next digit of the result. 
Result so far: 104362.06201
Subtracting 387 from 600 leaves us with 213.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2130, and continue the process.

On to step 14:
387 goes into 2130 5 times with a remainder of 195.
Write down 5 as next digit of the result. 
Result so far: 104362.062015
Subtracting 1935 from 2130 leaves us with 195.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1950, and continue the process.

Going ahead to step 15:
The number 387 fits into 1950 5 times, leaving a remainder of 15.
The number 5 becomes the next digit in our result. 
Result so far: 104362.0620155
If we subtract 1935 from 1950, we get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

The final outcome is 104362.0620155, with a leftover of 1.5e-07.