We look at the division of 509787 by 24 
We want to figure out the number of times 509787 can be divided by 24.

Let's proceed to step 1:
When dividing 5 by 24, we get 0 with a remainder of 5.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Include the next digit (0) from the dividend after 5, then repeat: 50 / 24

Advancing to step 2:
When dividing 50 by 24, we get 2 with a remainder of 2.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
If we take 48 away from 50, we end up with 2.
Append the next digit (9) from the dividend to 2 and continue with: 29 / 24

Step 3:
24 can be fit into 29 1 times, resulting in a remainder of 5.
The number 1 becomes the next digit in our result. 
Result so far: 21.0
If we subtract 24 from 29, we get 5.
Append the next digit (7) from the dividend to 5 and continue with: 57 / 24

Going ahead to step 4:
The number 24 fits into 57 2 times, leaving a remainder of 9.
Write down 2 as next digit of the result. 
Result so far: 212.0
If we subtract 48 from 57, we get 9.
Append the next digit (8) from the dividend to 9 and continue with: 98 / 24

Let's proceed to step 5:
If we divide 98 by 24, we get 4 and a remainder of 2.
Record the quotient 4 as the next digit in the result. 
Result so far: 2124.0
Subtract 96 from 98 to get 2.
Grab the next digit (7) from the dividend, add it to 2, then carry on: 27 / 24

On to step 6:
The number 24 fits into 27 1 times, leaving a remainder of 3.
Use 1 as the next digit of our solution. 
Result so far: 21241.0
The remainder is 3 after subtracting 24 from 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Going ahead to step 7:
The number 24 fits into 30 1 times, leaving a remainder of 6.
Write down 1 as next digit of the result. 
Result so far: 21241.1
Deduct 24 from 30 and we're left 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 8:
The number 24 fits into 60 2 times, leaving a remainder of 12.
Record the quotient 2 as the next digit in the result. 
Result so far: 21241.12
Subtracting 48 from 60 leaves us with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Let's proceed to step 9:
The number 24 fits into 120 5 times, leaving a remainder of 0.
The next digit of our result is 5. 
Result so far: 21241.125
If we take 120 away from 120, 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.

Going ahead to step 10:
If we divide 0 by 24, we get 0 and a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 21241.125
If we subtract 0 from 0, 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.

Step 11:
24 can be fit into 0 0 times, resulting in a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 21241.125
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 outcome is 21241.125, with a leftover of 0.0.