39997915 ÷ 161 
Our goal is to divide 39997915 by 161.

Advancing to step 1:
If we divide 3 by 161, we get 0 and a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Bring next digit (9) of the dividend behind the 3 and repeat the process: 39 / 161

On to step 2:
If we divide 39 by 161, we get 0 and a remainder of 39.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 39 after subtracting 0 from 39.
Append the next digit (9) from the dividend to 39 and continue with: 399 / 161

On to step 3:
161 can be fit into 399 2 times, resulting in a remainder of 77.
Put 2 as the next digit of the answer. 
Result so far: 2.0
Deduct 322 from 399 and we're left with 77.
Take the next digit (9) from the dividend and append it to 77, then repeat: 779 / 161

On to step 4:
161 can be fit into 779 4 times, resulting in a remainder of 135.
Put 4 as the next digit of the answer. 
Result so far: 24.0
Subtract 644 from 779 to get 135.
Fetch the next digit (7) from the dividend, attach it to 135 and continue: 1357 / 161

Advancing to step 5:
The number 161 fits into 1357 8 times, leaving a remainder of 69.
Write down 8 as next digit of the result. 
Result so far: 248.0
If we take 1288 away from 1357, we end up with 69.
Append the next digit (9) from the dividend to 69 and continue with: 699 / 161

Step 6:
If we divide 699 by 161, we get 4 and a remainder of 55.
The next digit of our result is 4. 
Result so far: 2484.0
If we subtract 644 from 699, we get 55.
Bring next digit (1) of the dividend behind the 55 and repeat the process: 551 / 161

Moving on to step 7:
When dividing 551 by 161, we get 3 with a remainder of 68.
Put 3 as the next digit of the answer. 
Result so far: 24843.0
Subtract 483 from 551 to get 68.
Include the next digit (5) from the dividend after 68, then repeat: 685 / 161

On to step 8:
685 divided by 161 is 4 with a remainder of 41.
Record the quotient 4 as the next digit in the result. 
Result so far: 248434.0
Subtracting 644 from 685 leaves us with 41.
Since there are no more digits in the dividend, we add a zero to the remainder making it 410, and continue the process.

On to step 9:
161 can be fit into 410 2 times, resulting in a remainder of 88.
Put 2 as the next digit of the answer. 
Result so far: 248434.2
If we subtract 322 from 410, we get 88.
Since there are no more digits in the dividend, we add a zero to the remainder making it 880, and continue the process.

Step 10:
880 divided by 161 is 5 with a remainder of 75.
Use 5 as the next digit of our solution. 
Result so far: 248434.25
Deduct 805 from 880 and we're left with 75.
Since there are no more digits in the dividend, we add a zero to the remainder making it 750, and continue the process.

Going ahead to step 11:
161 goes into 750 4 times with a remainder of 106.
Put 4 as the next digit of the answer. 
Result so far: 248434.254
Subtracting 644 from 750 leaves us with 106.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1060, and continue the process.

On to step 12:
When dividing 1060 by 161, we get 6 with a remainder of 94.
Put 6 as the next digit of the answer. 
Result so far: 248434.2546
The remainder is 94 after subtracting 966 from 1060.
Since there are no more digits in the dividend, we add a zero to the remainder making it 940, and continue the process.

Advancing to step 13:
If we divide 940 by 161, we get 5 and a remainder of 135.
Use 5 as the next digit of our solution. 
Result so far: 248434.25465
Subtract 805 from 940 to get 135.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1350, and continue the process.

On to step 14:
When dividing 1350 by 161, we get 8 with a remainder of 62.
Use 8 as the next digit of our solution. 
Result so far: 248434.254658
If we take 1288 away from 1350, we end up with 62.
Since there are no more digits in the dividend, we add a zero to the remainder making it 620, and continue the process.

Going ahead to step 15:
161 can be fit into 620 3 times, resulting in a remainder of 137.
The next digit of our result is 3. 
Result so far: 248434.2546583
Deduct 483 from 620 and we're left with 137.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1370, and continue the process.

On to step 16:
1370 divided by 161 is 8 with a remainder of 82.
Put 8 as the next digit of the answer. 
Result so far: 248434.25465838
The remainder is 82 after subtracting 1288 from 1370.
Since there are no more digits in the dividend, we add a zero to the remainder making it 820, and continue the process.

Our division results in 248434.25465838 with a remaining 8.2e-08.