We're dividing 517631 by 31 
We want to figure out the number of times 517631 can be divided by 31.

On to step 1:
When dividing 5 by 31, we get 0 with a remainder of 5.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Fetch the next digit (1) from the dividend, attach it to 5 and continue: 51 / 31

Moving on to step 2:
51 divided by 31 is 1 with a remainder of 20.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtract 31 from 51 to get 20.
Bring next digit (7) of the dividend behind the 20 and repeat the process: 207 / 31

Let's proceed to step 3:
If we divide 207 by 31, we get 6 and a remainder of 21.
Put 6 as the next digit of the answer. 
Result so far: 16.0
Subtracting 186 from 207 leaves us with 21.
Fetch the next digit (6) from the dividend, attach it to 21 and continue: 216 / 31

On to step 4:
When dividing 216 by 31, we get 6 with a remainder of 30.
The number 6 becomes the next digit in our result. 
Result so far: 166.0
Subtract 186 from 216 to get 30.
Bring next digit (3) of the dividend behind the 30 and repeat the process: 303 / 31

On to step 5:
31 goes into 303 9 times with a remainder of 24.
Write down 9 as next digit of the result. 
Result so far: 1669.0
The remainder is 24 after subtracting 279 from 303.
Fetch the next digit (1) from the dividend, attach it to 24 and continue: 241 / 31

Step 6:
31 can be fit into 241 7 times, resulting in a remainder of 24.
Put 7 as the next digit of the answer. 
Result so far: 16697.0
The remainder is 24 after subtracting 217 from 241.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Let's proceed to step 7:
The number 31 fits into 240 7 times, leaving a remainder of 23.
Write down 7 as next digit of the result. 
Result so far: 16697.7
If we take 217 away from 240, we end up with 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Advancing to step 8:
230 divided by 31 is 7 with a remainder of 13.
Write down 7 as next digit of the result. 
Result so far: 16697.77
If we subtract 217 from 230, we get 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

The final outcome is 16697.77, with a leftover of 0.013.