We're dividing 389315 by 40 
We want to figure out the number of times 389315 can be divided by 40.

Step 1:
40 can be fit into 3 0 times, resulting in 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.
Include the next digit (8) from the dividend after 3, then repeat: 38 / 40

Going ahead to step 2:
38 divided by 40 is 0 with a remainder of 38.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 38, we get 38.
Include the next digit (9) from the dividend after 38, then repeat: 389 / 40

Let's proceed to step 3:
If we divide 389 by 40, we get 9 and a remainder of 29.
Use 9 as the next digit of our solution. 
Result so far: 9.0
The remainder is 29 after subtracting 360 from 389.
Grab the next digit (3) from the dividend, add it to 29, then carry on: 293 / 40

Moving on to step 4:
If we divide 293 by 40, we get 7 and a remainder of 13.
The next digit of our result is 7. 
Result so far: 97.0
Deduct 280 from 293 and we're left with 13.
Bring next digit (1) of the dividend behind the 13 and repeat the process: 131 / 40

On to step 5:
If we divide 131 by 40, we get 3 and a remainder of 11.
Use 3 as the next digit of our solution. 
Result so far: 973.0
If we subtract 120 from 131, we get 11.
Bring next digit (5) of the dividend behind the 11 and repeat the process: 115 / 40

Let's proceed to step 6:
If we divide 115 by 40, we get 2 and a remainder of 35.
The next digit of our result is 2. 
Result so far: 9732.0
Deduct 80 from 115 and we're left with 35.
Since there are no more digits in the dividend, we add a zero to the remainder making it 350, and continue the process.

Going ahead to step 7:
When dividing 350 by 40, we get 8 with a remainder of 30.
Write down 8 as next digit of the result. 
Result so far: 9732.8
Subtracting 320 from 350 leaves us with 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 8:
40 goes into 300 7 times with a remainder of 20.
Put 7 as the next digit of the answer. 
Result so far: 9732.87
Subtracting 280 from 300 leaves us 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.

On to step 9:
If we divide 200 by 40, we get 5 and a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 9732.875
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.

Going ahead to step 10:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 9732.875
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.

Step 11:
40 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 9732.875
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 quotient of the division is 9732.875, and the remainder is 0.0.