We divide 540718 by 31
We want to figure out the number of times 540718 can be divided by 31.

Advancing to step 1:
31 goes into 5 0 times with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Grab the next digit (4) from the dividend, add it to 5, then carry on: 54 / 31

On to step 2:
31 can be fit into 54 1 times, resulting in a remainder of 23.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtract 31 from 54 to get 23.
Append the next digit (0) from the dividend to 23 and continue with: 230 / 31

Going ahead to step 3:
230 divided by 31 is 7 with a remainder of 13.
Use 7 as the next digit of our solution. 
Result so far: 17.0
If we take 217 away from 230, we end up with 13.
Bring next digit (7) of the dividend behind the 13 and repeat the process: 137 / 31

Going ahead to step 4:
If we divide 137 by 31, we get 4 and a remainder of 13.
Use 4 as the next digit of our solution. 
Result so far: 174.0
The remainder is 13 after subtracting 124 from 137.
Include the next digit (1) from the dividend after 13, then repeat: 131 / 31

Advancing to step 5:
The number 31 fits into 131 4 times, leaving a remainder of 7.
Write down 4 as next digit of the result. 
Result so far: 1744.0
The remainder is 7 after subtracting 124 from 131.
Include the next digit (8) from the dividend after 7, then repeat: 78 / 31

On to step 6:
When dividing 78 by 31, we get 2 with a remainder of 16.
Write down 2 as next digit of the result. 
Result so far: 17442.0
If we subtract 62 from 78, we get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Moving on to step 7:
31 can be fit into 160 5 times, resulting in a remainder of 5.
The number 5 becomes the next digit in our result. 
Result so far: 17442.5
If we subtract 155 from 160, we get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Step 8:
31 can be fit into 50 1 times, resulting in a remainder of 19.
Use 1 as the next digit of our solution. 
Result so far: 17442.51
Subtracting 31 from 50 leaves us with 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

On to step 9:
The number 31 fits into 190 6 times, leaving a remainder of 4.
The number 6 becomes the next digit in our result. 
Result so far: 17442.516
Subtracting 186 from 190 leaves us with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Going ahead to step 10:
When dividing 40 by 31, we get 1 with a remainder of 9.
Record the quotient 1 as the next digit in the result. 
Result so far: 17442.5161
If we take 31 away from 40, we end up with 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Going ahead to step 11:
31 goes into 90 2 times with a remainder of 28.
Record the quotient 2 as the next digit in the result. 
Result so far: 17442.51612
If we subtract 62 from 90, we get 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Step 12:
280 divided by 31 is 9 with a remainder of 1.
The number 9 becomes the next digit in our result. 
Result so far: 17442.516129
The remainder is 1 after subtracting 279 from 280.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Let's proceed to step 13:
31 goes into 10 0 times with a remainder of 10.
Use 0 as the next digit of our solution. 
Result so far: 17442.516129
Deduct 0 from 10 and we're left with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Going ahead to step 14:
100 divided by 31 is 3 with a remainder of 7.
Write down 3 as next digit of the result. 
Result so far: 17442.51612903
Subtract 93 from 100 to get 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

The final outcome is 17442.51612903, with a leftover of 7e-09.