We look at the division of 31278 by 40 
Our goal is to divide 31278 by 40.

On to step 1:
The number 40 fits into 3 0 times, leaving a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Bring next digit (1) of the dividend behind the 3 and repeat the process: 31 / 40

Step 2:
If we divide 31 by 40, we get 0 and a remainder of 31.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 31 after subtracting 0 from 31.
Include the next digit (2) from the dividend after 31, then repeat: 312 / 40

Advancing to step 3:
40 can be fit into 312 7 times, resulting in a remainder of 32.
Write down 7 as next digit of the result. 
Result so far: 7.0
The remainder is 32 after subtracting 280 from 312.
Fetch the next digit (7) from the dividend, attach it to 32 and continue: 327 / 40

Step 4:
If we divide 327 by 40, we get 8 and a remainder of 7.
Record the quotient 8 as the next digit in the result. 
Result so far: 78.0
If we take 320 away from 327, we end up with 7.
Bring next digit (8) of the dividend behind the 7 and repeat the process: 78 / 40

Let's proceed to step 5:
When dividing 78 by 40, we get 1 with a remainder of 38.
Record the quotient 1 as the next digit in the result. 
Result so far: 781.0
If we take 40 away from 78, we end up 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.

On to step 6:
The number 40 fits into 380 9 times, leaving a remainder of 20.
Write down 9 as next digit of the result. 
Result so far: 781.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.

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

Step 8:
40 goes into 0 0 times with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 781.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.

On to step 9:
If we divide 0 by 40, we get 0 and a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 781.95
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 781.95, and the remainder is 0.0.