We look at the division of 580007 by 40 
Let's see how many times 40 fits into 580007.

Advancing to step 1:
If we divide 5 by 40, we get 0 and a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Fetch the next digit (8) from the dividend, attach it to 5 and continue: 58 / 40

On to step 2:
40 can be fit into 58 1 times, resulting in a remainder of 18.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Deduct 40 from 58 and we're left with 18.
Append the next digit (0) from the dividend to 18 and continue with: 180 / 40

On to step 3:
40 goes into 180 4 times with a remainder of 20.
The next digit of our result is 4. 
Result so far: 14.0
If we subtract 160 from 180, we get 20.
Bring next digit (0) of the dividend behind the 20 and repeat the process: 200 / 40

Moving on to step 4:
40 can be fit into 200 5 times, resulting in a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 145.0
If we subtract 200 from 200, we get 0.
Grab the next digit (0) from the dividend, add it to 0, then carry on: 0 / 40

Step 5:
40 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 1450.0
Subtracting 0 from 0 leaves us with 0.
Include the next digit (7) from the dividend after 0, then repeat: 7 / 40

Moving on to step 6:
When dividing 7 by 40, we get 0 with a remainder of 7.
Put 0 as the next digit of the answer. 
Result so far: 14500.0
If we subtract 0 from 7, we get 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Going ahead to step 7:
40 can be fit into 70 1 times, resulting in a remainder of 30.
Write down 1 as next digit of the result. 
Result so far: 14500.1
If we subtract 40 from 70, 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.

Step 8:
The number 40 fits into 300 7 times, leaving a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 14500.17
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.

Step 9:
When dividing 200 by 40, we get 5 with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 14500.175
The remainder is 0 after subtracting 200 from 200.
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 10:
40 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: 14500.175
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.

Moving on to step 11:
0 divided by 40 is 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 14500.175
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.

After the division, we end up with 14500.175 and a remainder of 0.0.