We're dividing 31001791 by 838 
Let's see how many times 838 fits into 31001791.

Advancing to step 1:
838 goes into 3 0 times with a remainder of 3.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 3 to get 3.
Grab the next digit (1) from the dividend, add it to 3, then carry on: 31 / 838

Going ahead to step 2:
838 goes into 31 0 times with a remainder of 31.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 31 leaves us with 31.
Grab the next digit (0) from the dividend, add it to 31, then carry on: 310 / 838

On to step 3:
310 divided by 838 is 0 with a remainder of 310.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 310 to get 310.
Bring next digit (0) of the dividend behind the 310 and repeat the process: 3100 / 838

Moving on to step 4:
3100 divided by 838 is 3 with a remainder of 586.
Record the quotient 3 as the next digit in the result. 
Result so far: 3.0
Deduct 2514 from 3100 and we're left with 586.
Take the next digit (1) from the dividend and append it to 586, then repeat: 5861 / 838

Going ahead to step 5:
When dividing 5861 by 838, we get 6 with a remainder of 833.
Write down 6 as next digit of the result. 
Result so far: 36.0
If we subtract 5028 from 5861, we get 833.
Grab the next digit (7) from the dividend, add it to 833, then carry on: 8337 / 838

Moving on to step 6:
8337 divided by 838 is 9 with a remainder of 795.
Put 9 as the next digit of the answer. 
Result so far: 369.0
Deduct 7542 from 8337 and we're left with 795.
Bring next digit (9) of the dividend behind the 795 and repeat the process: 7959 / 838

Going ahead to step 7:
When dividing 7959 by 838, we get 9 with a remainder of 417.
The next digit of our result is 9. 
Result so far: 3699.0
Subtract 7542 from 7959 to get 417.
Include the next digit (1) from the dividend after 417, then repeat: 4171 / 838

Advancing to step 8:
4171 divided by 838 is 4 with a remainder of 819.
Write down 4 as next digit of the result. 
Result so far: 36994.0
The remainder is 819 after subtracting 3352 from 4171.
Since there are no more digits in the dividend, we add a zero to the remainder making it 8190, and continue the process.

Going ahead to step 9:
8190 divided by 838 is 9 with a remainder of 648.
The number 9 becomes the next digit in our result. 
Result so far: 36994.9
If we take 7542 away from 8190, we end up with 648.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6480, and continue the process.

On to step 10:
838 can be fit into 6480 7 times, resulting in a remainder of 614.
Write down 7 as next digit of the result. 
Result so far: 36994.97
Subtract 5866 from 6480 to 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.

On to step 11:
838 goes into 6140 7 times with a remainder of 274.
Record the quotient 7 as the next digit in the result. 
Result so far: 36994.977
The remainder is 274 after subtracting 5866 from 6140.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2740, and continue the process.

After the division, we end up with 36994.977 and a remainder of 0.0274.