We look at the division of 331997 by 31 
We want to figure out the number of times 331997 can be divided by 31.

Let's proceed to 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
Subtracting 0 from 3 leaves us with 3.
Grab the next digit (3) from the dividend, add it to 3, then carry on: 33 / 31

On to step 2:
31 can be fit into 33 1 times, resulting in a remainder of 2.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we take 31 away from 33, we end up with 2.
Grab the next digit (1) from the dividend, add it to 2, then carry on: 21 / 31

Let's proceed to step 3:
21 divided by 31 is 0 with a remainder of 21.
Use 0 as the next digit of our solution. 
Result so far: 10.0
If we take 0 away from 21, we end up with 21.
Append the next digit (9) from the dividend to 21 and continue with: 219 / 31

Going ahead to step 4:
The number 31 fits into 219 7 times, leaving a remainder of 2.
The next digit of our result is 7. 
Result so far: 107.0
Subtract 217 from 219 to get 2.
Grab the next digit (9) from the dividend, add it to 2, then carry on: 29 / 31

Going ahead to step 5:
The number 31 fits into 29 0 times, leaving a remainder of 29.
The next digit of our result is 0. 
Result so far: 1070.0
Deduct 0 from 29 and we're left with 29.
Grab the next digit (7) from the dividend, add it to 29, then carry on: 297 / 31

On to step 6:
If we divide 297 by 31, we get 9 and a remainder of 18.
The next digit of our result is 9. 
Result so far: 10709.0
Deduct 279 from 297 and we're left with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Moving on to step 7:
180 divided by 31 is 5 with a remainder of 25.
The next digit of our result is 5. 
Result so far: 10709.5
Subtract 155 from 180 to get 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

Step 8:
When dividing 250 by 31, we get 8 with a remainder of 2.
Write down 8 as next digit of the result. 
Result so far: 10709.58
Deduct 248 from 250 and we're left with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

On to step 9:
If we divide 20 by 31, we get 0 and a remainder of 20.
The next digit of our result is 0. 
Result so far: 10709.58
The remainder is 20 after subtracting 0 from 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Moving on to step 10:
When dividing 200 by 31, we get 6 with a remainder of 14.
Put 6 as the next digit of the answer. 
Result so far: 10709.5806
Deduct 186 from 200 and we're left with 14.
Since there are no more digits in the dividend, we add a zero to the remainder making it 140, and continue the process.

Advancing to step 11:
If we divide 140 by 31, we get 4 and a remainder of 16.
The next digit of our result is 4. 
Result so far: 10709.58064
Subtracting 124 from 140 leaves us with 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Moving on to step 12:
31 can be fit into 160 5 times, resulting in a remainder of 5.
The number 5 becomes the next digit in our result. 
Result so far: 10709.580645
The remainder is 5 after subtracting 155 from 160.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Going ahead to step 13:
31 can be fit into 50 1 times, resulting in a remainder of 19.
Record the quotient 1 as the next digit in the result. 
Result so far: 10709.5806451
Deduct 31 from 50 and we're left with 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Moving on to step 14:
31 can be fit into 190 6 times, resulting in a remainder of 4.
Use 6 as the next digit of our solution. 
Result so far: 10709.58064516
If we subtract 186 from 190, we get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

The final result is 10709.58064516 with a remainder of 4e-09.