Let's divide 840142 by 31
We want to figure out the number of times 840142 can be divided by 31.

Let's proceed to step 1:
8 divided by 31 is 0 with a remainder of 8.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 8 to get 8.
Fetch the next digit (4) from the dividend, attach it to 8 and continue: 84 / 31

Moving on to step 2:
If we divide 84 by 31, we get 2 and a remainder of 22.
Use 2 as the next digit of our solution. 
Result so far: 2.0
If we take 62 away from 84, we end up with 22.
Append the next digit (0) from the dividend to 22 and continue with: 220 / 31

Going ahead to step 3:
220 divided by 31 is 7 with a remainder of 3.
Write down 7 as next digit of the result. 
Result so far: 27.0
The remainder is 3 after subtracting 217 from 220.
Append the next digit (1) from the dividend to 3 and continue with: 31 / 31

Let's proceed to step 4:
31 goes into 31 1 times with a remainder of 0.
Write down 1 as next digit of the result. 
Result so far: 271.0
Subtracting 31 from 31 leaves us with 0.
Bring next digit (4) of the dividend behind the 0 and repeat the process: 4 / 31

Going ahead to step 5:
When dividing 4 by 31, we get 0 with a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 2710.0
The remainder is 4 after subtracting 0 from 4.
Bring next digit (2) of the dividend behind the 4 and repeat the process: 42 / 31

Advancing to step 6:
31 can be fit into 42 1 times, resulting in a remainder of 11.
The number 1 becomes the next digit in our result. 
Result so far: 27101.0
Subtract 31 from 42 to get 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Going ahead to step 7:
31 goes into 110 3 times with a remainder of 17.
The next digit of our result is 3. 
Result so far: 27101.3
Subtracting 93 from 110 leaves us with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Let's proceed to step 8:
The number 31 fits into 170 5 times, leaving a remainder of 15.
Put 5 as the next digit of the answer. 
Result so far: 27101.35
Subtract 155 from 170 to get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Going ahead to step 9:
The number 31 fits into 150 4 times, leaving a remainder of 26.
The number 4 becomes the next digit in our result. 
Result so far: 27101.354
If we take 124 away from 150, we end up with 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Going ahead to step 10:
31 goes into 260 8 times with a remainder of 12.
Record the quotient 8 as the next digit in the result. 
Result so far: 27101.3548
If we take 248 away from 260, we end up with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Advancing to step 11:
When dividing 120 by 31, we get 3 with a remainder of 27.
The next digit of our result is 3. 
Result so far: 27101.35483
If we subtract 93 from 120, we get 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Let's proceed to step 12:
When dividing 270 by 31, we get 8 with a remainder of 22.
The next digit of our result is 8. 
Result so far: 27101.354838
If we take 248 away from 270, we end up with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Step 13:
If we divide 220 by 31, we get 7 and a remainder of 3.
The number 7 becomes the next digit in our result. 
Result so far: 27101.3548387
If we take 217 away from 220, we end up with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Let's proceed to step 14:
30 divided by 31 is 0 with a remainder of 30.
The next digit of our result is 0. 
Result so far: 27101.3548387
The remainder is 30 after subtracting 0 from 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

The final outcome is 27101.3548387, with a leftover of 3e-08.