We're dividing 40019878 by 145 
We're looking to find how many times 145 goes into 40019878.

Going ahead to step 1:
When dividing 4 by 145, we get 0 with a remainder of 4.
Put 0 as the next digit of the answer. 
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 / 145

On to step 2:
40 divided by 145 is 0 with a remainder of 40.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 40 after subtracting 0 from 40.
Append the next digit (0) from the dividend to 40 and continue with: 400 / 145

Advancing to step 3:
When dividing 400 by 145, we get 2 with a remainder of 110.
Put 2 as the next digit of the answer. 
Result so far: 2.0
If we subtract 290 from 400, we get 110.
Fetch the next digit (1) from the dividend, attach it to 110 and continue: 1101 / 145

On to step 4:
145 can be fit into 1101 7 times, resulting in a remainder of 86.
The next digit of our result is 7. 
Result so far: 27.0
Subtracting 1015 from 1101 leaves us with 86.
Include the next digit (9) from the dividend after 86, then repeat: 869 / 145

Step 5:
145 can be fit into 869 5 times, resulting in a remainder of 144.
The number 5 becomes the next digit in our result. 
Result so far: 275.0
If we take 725 away from 869, we end up with 144.
Fetch the next digit (8) from the dividend, attach it to 144 and continue: 1448 / 145

Moving on to step 6:
The number 145 fits into 1448 9 times, leaving a remainder of 143.
Record the quotient 9 as the next digit in the result. 
Result so far: 2759.0
If we take 1305 away from 1448, we end up with 143.
Bring next digit (7) of the dividend behind the 143 and repeat the process: 1437 / 145

Going ahead to step 7:
1437 divided by 145 is 9 with a remainder of 132.
Record the quotient 9 as the next digit in the result. 
Result so far: 27599.0
If we take 1305 away from 1437, we end up with 132.
Include the next digit (8) from the dividend after 132, then repeat: 1328 / 145

On to step 8:
When dividing 1328 by 145, we get 9 with a remainder of 23.
The number 9 becomes the next digit in our result. 
Result so far: 275999.0
Deduct 1305 from 1328 and we're left with 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Let's proceed to step 9:
If we divide 230 by 145, we get 1 and a remainder of 85.
The next digit of our result is 1. 
Result so far: 275999.1
If we subtract 145 from 230, we get 85.
Since there are no more digits in the dividend, we add a zero to the remainder making it 850, and continue the process.

Moving on to step 10:
145 can be fit into 850 5 times, resulting in a remainder of 125.
Put 5 as the next digit of the answer. 
Result so far: 275999.15
If we take 725 away from 850, we end up with 125.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1250, and continue the process.

Moving on to step 11:
145 goes into 1250 8 times with a remainder of 90.
Record the quotient 8 as the next digit in the result. 
Result so far: 275999.158
If we take 1160 away from 1250, we end up with 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 900, and continue the process.

Step 12:
The number 145 fits into 900 6 times, leaving a remainder of 30.
Record the quotient 6 as the next digit in the result. 
Result so far: 275999.1586
If we subtract 870 from 900, we get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Moving on to step 13:
If we divide 300 by 145, we get 2 and a remainder of 10.
Write down 2 as next digit of the result. 
Result so far: 275999.15862
Subtract 290 from 300 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 14:
The number 145 fits into 100 0 times, leaving a remainder of 100.
Use 0 as the next digit of our solution. 
Result so far: 275999.15862
Deduct 0 from 100 and we're left with 100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1000, and continue the process.

Advancing to step 15:
When dividing 1000 by 145, we get 6 with a remainder of 130.
The next digit of our result is 6. 
Result so far: 275999.1586206
If we subtract 870 from 1000, we get 130.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1300, and continue the process.

On to step 16:
If we divide 1300 by 145, we get 8 and a remainder of 140.
Use 8 as the next digit of our solution. 
Result so far: 275999.15862068
Subtract 1160 from 1300 to get 140.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1400, and continue the process.

The final outcome is 275999.15862068, with a leftover of 1.4e-07.