We divide 317887 by 31
We're looking to find how many times 31 goes into 317887.

Step 1:
3 divided by 31 is 0 with a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 3, we get 3.
Grab the next digit (1) from the dividend, add it to 3, then carry on: 31 / 31

Advancing to step 2:
The number 31 fits into 31 1 times, leaving a remainder of 0.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtracting 31 from 31 leaves us with 0.
Include the next digit (7) from the dividend after 0, then repeat: 7 / 31

On to step 3:
31 goes into 7 0 times with a remainder of 7.
Write down 0 as next digit of the result. 
Result so far: 10.0
If we take 0 away from 7, we end up with 7.
Bring next digit (8) of the dividend behind the 7 and repeat the process: 78 / 31

Moving on to step 4:
31 goes into 78 2 times with a remainder of 16.
Record the quotient 2 as the next digit in the result. 
Result so far: 102.0
Subtracting 62 from 78 leaves us with 16.
Append the next digit (8) from the dividend to 16 and continue with: 168 / 31

Moving on to step 5:
31 can be fit into 168 5 times, resulting in a remainder of 13.
Record the quotient 5 as the next digit in the result. 
Result so far: 1025.0
If we take 155 away from 168, we end up with 13.
Include the next digit (7) from the dividend after 13, then repeat: 137 / 31

Going ahead to step 6:
137 divided by 31 is 4 with a remainder of 13.
Write down 4 as next digit of the result. 
Result so far: 10254.0
If we take 124 away from 137, we end up with 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

On to step 7:
The number 31 fits into 130 4 times, leaving a remainder of 6.
Record the quotient 4 as the next digit in the result. 
Result so far: 10254.4
Subtract 124 from 130 to get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Going ahead to step 8:
The number 31 fits into 60 1 times, leaving a remainder of 29.
The next digit of our result is 1. 
Result so far: 10254.41
Subtract 31 from 60 to get 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Advancing to step 9:
When dividing 290 by 31, we get 9 with a remainder of 11.
Write down 9 as next digit of the result. 
Result so far: 10254.419
Subtracting 279 from 290 leaves us with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Step 10:
When dividing 110 by 31, we get 3 with a remainder of 17.
Use 3 as the next digit of our solution. 
Result so far: 10254.4193
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 11:
When dividing 170 by 31, we get 5 with a remainder of 15.
Put 5 as the next digit of the answer. 
Result so far: 10254.41935
Deduct 155 from 170 and we're left with 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Let's proceed to step 12:
If we divide 150 by 31, we get 4 and a remainder of 26.
Record the quotient 4 as the next digit in the result. 
Result so far: 10254.419354
The remainder is 26 after subtracting 124 from 150.
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 13:
If we divide 260 by 31, we get 8 and a remainder of 12.
Put 8 as the next digit of the answer. 
Result so far: 10254.4193548
The remainder is 12 after subtracting 248 from 260.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Going ahead to step 14:
If we divide 120 by 31, we get 3 and a remainder of 27.
The number 3 becomes the next digit in our result. 
Result so far: 10254.41935483
The remainder is 27 after subtracting 93 from 120.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

In conclusion, the division gives 10254.41935483 with a balance of 2.7e-08.