Let's divide 395958 by 40
We want to divide 395958 by 40.

Moving on to step 1:
The number 40 fits into 3 0 times, leaving a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 3 and we're left with 3.
Take the next digit (9) from the dividend and append it to 3, then repeat: 39 / 40

Let's proceed to step 2:
40 can be fit into 39 0 times, resulting in a remainder of 39.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Deduct 0 from 39 and we're left with 39.
Include the next digit (5) from the dividend after 39, then repeat: 395 / 40

Let's proceed to step 3:
If we divide 395 by 40, we get 9 and a remainder of 35.
The next digit of our result is 9. 
Result so far: 9.0
The remainder is 35 after subtracting 360 from 395.
Fetch the next digit (9) from the dividend, attach it to 35 and continue: 359 / 40

Going ahead to step 4:
The number 40 fits into 359 8 times, leaving a remainder of 39.
Record the quotient 8 as the next digit in the result. 
Result so far: 98.0
The remainder is 39 after subtracting 320 from 359.
Take the next digit (5) from the dividend and append it to 39, then repeat: 395 / 40

Let's proceed to step 5:
40 goes into 395 9 times with a remainder of 35.
Record the quotient 9 as the next digit in the result. 
Result so far: 989.0
If we subtract 360 from 395, we get 35.
Grab the next digit (8) from the dividend, add it to 35, then carry on: 358 / 40

Let's proceed to step 6:
40 can be fit into 358 8 times, resulting in a remainder of 38.
Write down 8 as next digit of the result. 
Result so far: 9898.0
Deduct 320 from 358 and we're left with 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

Advancing to step 7:
40 goes into 380 9 times with a remainder of 20.
Use 9 as the next digit of our solution. 
Result so far: 9898.9
Deduct 360 from 380 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.

Moving on to step 8:
When dividing 200 by 40, we get 5 with a remainder of 0.
The next digit of our result is 5. 
Result so far: 9898.95
Subtracting 200 from 200 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.

On to step 9:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 9898.95
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.

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: 9898.95
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.

The final outcome is 9898.95, with a leftover of 0.0.