We're dividing 31716591 by 877 
Let's see how many times 877 fits into 31716591.

On to step 1:
When dividing 3 by 877, we get 0 with a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 3 leaves us with 3.
Fetch the next digit (1) from the dividend, attach it to 3 and continue: 31 / 877

On to step 2:
877 can be fit into 31 0 times, resulting in a remainder of 31.
The next digit of our result is 0. 
Result so far: 0.0
If we subtract 0 from 31, we get 31.
Include the next digit (7) from the dividend after 31, then repeat: 317 / 877

Moving on to step 3:
317 divided by 877 is 0 with a remainder of 317.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 317, we get 317.
Bring next digit (1) of the dividend behind the 317 and repeat the process: 3171 / 877

Going ahead to step 4:
The number 877 fits into 3171 3 times, leaving a remainder of 540.
The number 3 becomes the next digit in our result. 
Result so far: 3.0
Subtracting 2631 from 3171 leaves us with 540.
Take the next digit (6) from the dividend and append it to 540, then repeat: 5406 / 877

On to step 5:
The number 877 fits into 5406 6 times, leaving a remainder of 144.
The number 6 becomes the next digit in our result. 
Result so far: 36.0
Subtract 5262 from 5406 to get 144.
Include the next digit (5) from the dividend after 144, then repeat: 1445 / 877

Going ahead to step 6:
877 can be fit into 1445 1 times, resulting in a remainder of 568.
Put 1 as the next digit of the answer. 
Result so far: 361.0
Deduct 877 from 1445 and we're left with 568.
Include the next digit (9) from the dividend after 568, then repeat: 5689 / 877

Let's proceed to step 7:
When dividing 5689 by 877, we get 6 with a remainder of 427.
The next digit of our result is 6. 
Result so far: 3616.0
The remainder is 427 after subtracting 5262 from 5689.
Grab the next digit (1) from the dividend, add it to 427, then carry on: 4271 / 877

Step 8:
When dividing 4271 by 877, we get 4 with a remainder of 763.
Put 4 as the next digit of the answer. 
Result so far: 36164.0
Subtract 3508 from 4271 to get 763.
Since there are no more digits in the dividend, we add a zero to the remainder making it 7630, and continue the process.

Moving on to step 9:
If we divide 7630 by 877, we get 8 and a remainder of 614.
Use 8 as the next digit of our solution. 
Result so far: 36164.8
If we subtract 7016 from 7630, we get 614.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6140, and continue the process.

Step 10:
877 can be fit into 6140 7 times, resulting in a remainder of 1.
Put 7 as the next digit of the answer. 
Result so far: 36164.87
If we subtract 6139 from 6140, 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.

Advancing to step 11:
If we divide 10 by 877, we get 0 and a remainder of 10.
The number 0 becomes the next digit in our result. 
Result so far: 36164.87
If we take 0 away from 10, we end up 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.

Moving on to step 12:
877 goes into 100 0 times with a remainder of 100.
Use 0 as the next digit of our solution. 
Result so far: 36164.87
Subtracting 0 from 100 leaves us with 100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1000, and continue the process.

The final result is 36164.87 with a remainder of 0.001.