312238 divided by 40 
We want to figure out the number of times 312238 can be divided by 40.

Step 1:
3 divided by 40 is 0 with a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Bring next digit (1) of the dividend behind the 3 and repeat the process: 31 / 40

On to step 2:
31 divided by 40 is 0 with a remainder of 31.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 31 after subtracting 0 from 31.
Bring next digit (2) of the dividend behind the 31 and repeat the process: 312 / 40

Moving on to step 3:
40 goes into 312 7 times with a remainder of 32.
The next digit of our result is 7. 
Result so far: 7.0
The remainder is 32 after subtracting 280 from 312.
Append the next digit (2) from the dividend to 32 and continue with: 322 / 40

On to step 4:
The number 40 fits into 322 8 times, leaving a remainder of 2.
Put 8 as the next digit of the answer. 
Result so far: 78.0
The remainder is 2 after subtracting 320 from 322.
Fetch the next digit (3) from the dividend, attach it to 2 and continue: 23 / 40

Going ahead to step 5:
When dividing 23 by 40, we get 0 with a remainder of 23.
The next digit of our result is 0. 
Result so far: 780.0
If we subtract 0 from 23, we get 23.
Grab the next digit (8) from the dividend, add it to 23, then carry on: 238 / 40

On to step 6:
If we divide 238 by 40, we get 5 and a remainder of 38.
Put 5 as the next digit of the answer. 
Result so far: 7805.0
Deduct 200 from 238 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.

Let's proceed to step 7:
The number 40 fits into 380 9 times, leaving a remainder of 20.
Record the quotient 9 as the next digit in the result. 
Result so far: 7805.9
Subtracting 360 from 380 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.

Advancing 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: 7805.95
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.

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

Let's proceed to step 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 7805.95
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 outcome is 7805.95, with a leftover of 0.0.