We look at the division of 582218 by 31 
We want to figure out the number of times 582218 can be divided by 31.

Going ahead to step 1:
5 divided by 31 is 0 with a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Take the next digit (8) from the dividend and append it to 5, then repeat: 58 / 31

Going ahead to step 2:
31 goes into 58 1 times with a remainder of 27.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Deduct 31 from 58 and we're left with 27.
Grab the next digit (2) from the dividend, add it to 27, then carry on: 272 / 31

Advancing to step 3:
When dividing 272 by 31, we get 8 with a remainder of 24.
Record the quotient 8 as the next digit in the result. 
Result so far: 18.0
Subtracting 248 from 272 leaves us with 24.
Append the next digit (2) from the dividend to 24 and continue with: 242 / 31

Moving on to step 4:
If we divide 242 by 31, we get 7 and a remainder of 25.
The next digit of our result is 7. 
Result so far: 187.0
The remainder is 25 after subtracting 217 from 242.
Bring next digit (1) of the dividend behind the 25 and repeat the process: 251 / 31

Moving on to step 5:
If we divide 251 by 31, we get 8 and a remainder of 3.
Put 8 as the next digit of the answer. 
Result so far: 1878.0
Subtracting 248 from 251 leaves us with 3.
Take the next digit (8) from the dividend and append it to 3, then repeat: 38 / 31

Let's proceed to step 6:
38 divided by 31 is 1 with a remainder of 7.
The number 1 becomes the next digit in our result. 
Result so far: 18781.0
If we subtract 31 from 38, we 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.

Advancing to step 7:
31 goes into 70 2 times with a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 18781.2
Subtracting 62 from 70 leaves us with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Step 8:
80 divided by 31 is 2 with a remainder of 18.
Put 2 as the next digit of the answer. 
Result so far: 18781.22
Subtracting 62 from 80 leaves us with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

The final result is 18781.22 with a remainder of 0.018.