We're dividing 31170735 by 797 
We're looking to find how many times 797 goes into 31170735.

Going ahead to step 1:
If we divide 3 by 797, we get 0 and a remainder of 3.
Write down 0 as next digit of the result. 
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 / 797

Moving on to step 2:
When dividing 31 by 797, we get 0 with a remainder of 31.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Deduct 0 from 31 and we're left with 31.
Bring next digit (1) of the dividend behind the 31 and repeat the process: 311 / 797

Going ahead to step 3:
797 can be fit into 311 0 times, resulting in a remainder of 311.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 311 to get 311.
Bring next digit (7) of the dividend behind the 311 and repeat the process: 3117 / 797

Going ahead to step 4:
797 goes into 3117 3 times with a remainder of 726.
Put 3 as the next digit of the answer. 
Result so far: 3.0
The remainder is 726 after subtracting 2391 from 3117.
Bring next digit (0) of the dividend behind the 726 and repeat the process: 7260 / 797

On to step 5:
797 goes into 7260 9 times with a remainder of 87.
The next digit of our result is 9. 
Result so far: 39.0
Deduct 7173 from 7260 and we're left with 87.
Fetch the next digit (7) from the dividend, attach it to 87 and continue: 877 / 797

Advancing to step 6:
If we divide 877 by 797, we get 1 and a remainder of 80.
Use 1 as the next digit of our solution. 
Result so far: 391.0
If we subtract 797 from 877, we get 80.
Append the next digit (3) from the dividend to 80 and continue with: 803 / 797

Moving on to step 7:
797 goes into 803 1 times with a remainder of 6.
Put 1 as the next digit of the answer. 
Result so far: 3911.0
Deduct 797 from 803 and we're left with 6.
Grab the next digit (5) from the dividend, add it to 6, then carry on: 65 / 797

Going ahead to step 8:
If we divide 65 by 797, we get 0 and a remainder of 65.
Use 0 as the next digit of our solution. 
Result so far: 39110.0
If we subtract 0 from 65, we get 65.
Since there are no more digits in the dividend, we add a zero to the remainder making it 650, and continue the process.

Step 9:
650 divided by 797 is 0 with a remainder of 650.
The number 0 becomes the next digit in our result. 
Result so far: 39110.0
Subtracting 0 from 650 leaves us with 650.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6500, and continue the process.

Moving on to step 10:
When dividing 6500 by 797, we get 8 with a remainder of 124.
The next digit of our result is 8. 
Result so far: 39110.08
Deduct 6376 from 6500 and we're left with 124.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1240, and continue the process.

Going ahead to step 11:
797 goes into 1240 1 times with a remainder of 443.
Record the quotient 1 as the next digit in the result. 
Result so far: 39110.081
The remainder is 443 after subtracting 797 from 1240.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4430, and continue the process.

Advancing to step 12:
797 goes into 4430 5 times with a remainder of 445.
The number 5 becomes the next digit in our result. 
Result so far: 39110.0815
Subtracting 3985 from 4430 leaves us with 445.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4450, and continue the process.

On to step 13:
The number 797 fits into 4450 5 times, leaving a remainder of 465.
The number 5 becomes the next digit in our result. 
Result so far: 39110.08155
The remainder is 465 after subtracting 3985 from 4450.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4650, and continue the process.

The final outcome is 39110.08155, with a leftover of 0.000465.