We're dividing 582742 by 31 
Our goal is to divide 582742 by 31.

Advancing to step 1:
When dividing 5 by 31, we get 0 with a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Include the next digit (8) from the dividend after 5, then repeat: 58 / 31

Moving on to step 2:
If we divide 58 by 31, we get 1 and a remainder of 27.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtract 31 from 58 to get 27.
Take the next digit (2) from the dividend and append it to 27, then repeat: 272 / 31

On to step 3:
272 divided by 31 is 8 with a remainder of 24.
Use 8 as the next digit of our solution. 
Result so far: 18.0
The remainder is 24 after subtracting 248 from 272.
Include the next digit (7) from the dividend after 24, then repeat: 247 / 31

Step 4:
31 goes into 247 7 times with a remainder of 30.
Put 7 as the next digit of the answer. 
Result so far: 187.0
Subtract 217 from 247 to get 30.
Fetch the next digit (4) from the dividend, attach it to 30 and continue: 304 / 31

Advancing to step 5:
If we divide 304 by 31, we get 9 and a remainder of 25.
Use 9 as the next digit of our solution. 
Result so far: 1879.0
If we subtract 279 from 304, we get 25.
Append the next digit (2) from the dividend to 25 and continue with: 252 / 31

Advancing to step 6:
The number 31 fits into 252 8 times, leaving a remainder of 4.
Write down 8 as next digit of the result. 
Result so far: 18798.0
If we take 248 away from 252, we end up 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.

Step 7:
If we divide 40 by 31, we get 1 and a remainder of 9.
Put 1 as the next digit of the answer. 
Result so far: 18798.1
Subtracting 31 from 40 leaves us 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.

Step 8:
The number 31 fits into 90 2 times, leaving a remainder of 28.
Use 2 as the next digit of our solution. 
Result so far: 18798.12
The remainder is 28 after subtracting 62 from 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Step 9:
280 divided by 31 is 9 with a remainder of 1.
Put 9 as the next digit of the answer. 
Result so far: 18798.129
If we subtract 279 from 280, we get 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Going ahead to step 10:
31 goes into 10 0 times with a remainder of 10.
The number 0 becomes the next digit in our result. 
Result so far: 18798.129
If we subtract 0 from 10, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Step 11:
If we divide 100 by 31, we get 3 and a remainder of 7.
The next digit of our result is 3. 
Result so far: 18798.12903
Subtracting 93 from 100 leaves us with 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 12:
70 divided by 31 is 2 with a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 18798.129032
Subtract 62 from 70 to get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Advancing to step 13:
31 goes into 80 2 times with a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 18798.1290322
The remainder is 18 after subtracting 62 from 80.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

After the division, we end up with 18798.1290322 and a remainder of 1.8e-07.