We look at the division of 504686 by 40 
We want to divide 504686 by 40.

Advancing to step 1:
When dividing 5 by 40, we get 0 with a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Append the next digit (0) from the dividend to 5 and continue with: 50 / 40

Step 2:
The number 40 fits into 50 1 times, leaving a remainder of 10.
The next digit of our result is 1. 
Result so far: 1.0
The remainder is 10 after subtracting 40 from 50.
Fetch the next digit (4) from the dividend, attach it to 10 and continue: 104 / 40

Advancing to step 3:
104 divided by 40 is 2 with a remainder of 24.
Use 2 as the next digit of our solution. 
Result so far: 12.0
The remainder is 24 after subtracting 80 from 104.
Append the next digit (6) from the dividend to 24 and continue with: 246 / 40

On to step 4:
246 divided by 40 is 6 with a remainder of 6.
Record the quotient 6 as the next digit in the result. 
Result so far: 126.0
If we subtract 240 from 246, we get 6.
Fetch the next digit (8) from the dividend, attach it to 6 and continue: 68 / 40

Going ahead to step 5:
The number 40 fits into 68 1 times, leaving a remainder of 28.
The number 1 becomes the next digit in our result. 
Result so far: 1261.0
Deduct 40 from 68 and we're left with 28.
Bring next digit (6) of the dividend behind the 28 and repeat the process: 286 / 40

Let's proceed to step 6:
If we divide 286 by 40, we get 7 and a remainder of 6.
Write down 7 as next digit of the result. 
Result so far: 12617.0
If we take 280 away from 286, 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 7:
60 divided by 40 is 1 with a remainder of 20.
Put 1 as the next digit of the answer. 
Result so far: 12617.1
If we subtract 40 from 60, we get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Advancing to step 8:
40 goes into 200 5 times with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 12617.15
Subtract 200 from 200 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.

Step 9:
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: 12617.15
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.

On to step 10:
40 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 12617.15
Subtracting 0 from 0 leaves us 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 result is 12617.15 with a remainder of 0.0.