397030 divided by 40 
Let's see how many times 40 fits into 397030.

Going ahead to step 1:
40 can be fit into 3 0 times, resulting in a remainder of 3.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 3 and we're left with 3.
Grab the next digit (9) from the dividend, add it to 3, then carry on: 39 / 40

Step 2:
The number 40 fits into 39 0 times, leaving a remainder of 39.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 39, we get 39.
Include the next digit (7) from the dividend after 39, then repeat: 397 / 40

Going ahead to step 3:
397 divided by 40 is 9 with a remainder of 37.
Record the quotient 9 as the next digit in the result. 
Result so far: 9.0
Deduct 360 from 397 and we're left with 37.
Take the next digit (0) from the dividend and append it to 37, then repeat: 370 / 40

Moving on to step 4:
When dividing 370 by 40, we get 9 with a remainder of 10.
Put 9 as the next digit of the answer. 
Result so far: 99.0
Deduct 360 from 370 and we're left with 10.
Take the next digit (3) from the dividend and append it to 10, then repeat: 103 / 40

Advancing to step 5:
103 divided by 40 is 2 with a remainder of 23.
Record the quotient 2 as the next digit in the result. 
Result so far: 992.0
Subtract 80 from 103 to get 23.
Append the next digit (0) from the dividend to 23 and continue with: 230 / 40

Let's proceed to step 6:
40 can be fit into 230 5 times, resulting in a remainder of 30.
Record the quotient 5 as the next digit in the result. 
Result so far: 9925.0
Subtracting 200 from 230 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.

Step 7:
If we divide 300 by 40, we get 7 and a remainder of 20.
Record the quotient 7 as the next digit in the result. 
Result so far: 9925.7
If we take 280 away from 300, we end up 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 8:
If we divide 200 by 40, we get 5 and a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 9925.75
Deduct 200 from 200 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 9:
0 divided by 40 is 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 9925.75
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.

Going ahead to step 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 9925.75
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 9925.75 and a remainder of 0.0.