We look at the division of 40798171 by 385 
Our goal is to divide 40798171 by 385.

Going ahead to step 1:
When dividing 4 by 385, we get 0 with a remainder of 4.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 4 to get 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 385

Let's proceed to step 2:
When dividing 40 by 385, we get 0 with a remainder of 40.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 40 to get 40.
Include the next digit (7) from the dividend after 40, then repeat: 407 / 385

On to step 3:
When dividing 407 by 385, we get 1 with a remainder of 22.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtract 385 from 407 to get 22.
Take the next digit (9) from the dividend and append it to 22, then repeat: 229 / 385

Moving on to step 4:
385 can be fit into 229 0 times, resulting in a remainder of 229.
The next digit of our result is 0. 
Result so far: 10.0
Subtract 0 from 229 to get 229.
Fetch the next digit (8) from the dividend, attach it to 229 and continue: 2298 / 385

Going ahead to step 5:
385 can be fit into 2298 5 times, resulting in a remainder of 373.
The number 5 becomes the next digit in our result. 
Result so far: 105.0
If we subtract 1925 from 2298, we get 373.
Append the next digit (1) from the dividend to 373 and continue with: 3731 / 385

Step 6:
385 can be fit into 3731 9 times, resulting in a remainder of 266.
Record the quotient 9 as the next digit in the result. 
Result so far: 1059.0
The remainder is 266 after subtracting 3465 from 3731.
Append the next digit (7) from the dividend to 266 and continue with: 2667 / 385

Moving on to step 7:
2667 divided by 385 is 6 with a remainder of 357.
Record the quotient 6 as the next digit in the result. 
Result so far: 10596.0
If we subtract 2310 from 2667, we get 357.
Take the next digit (1) from the dividend and append it to 357, then repeat: 3571 / 385

Moving on to step 8:
3571 divided by 385 is 9 with a remainder of 106.
The next digit of our result is 9. 
Result so far: 105969.0
Subtracting 3465 from 3571 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.

Let's proceed to step 9:
385 goes into 1060 2 times with a remainder of 290.
Record the quotient 2 as the next digit in the result. 
Result so far: 105969.2
Subtract 770 from 1060 to get 290.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2900, and continue the process.

Let's proceed to step 10:
385 can be fit into 2900 7 times, resulting in a remainder of 205.
Record the quotient 7 as the next digit in the result. 
Result so far: 105969.27
The remainder is 205 after subtracting 2695 from 2900.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2050, and continue the process.

On to step 11:
2050 divided by 385 is 5 with a remainder of 125.
Use 5 as the next digit of our solution. 
Result so far: 105969.275
The remainder is 125 after subtracting 1925 from 2050.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1250, and continue the process.

Step 12:
385 can be fit into 1250 3 times, resulting in a remainder of 95.
Use 3 as the next digit of our solution. 
Result so far: 105969.2753
Deduct 1155 from 1250 and we're left with 95.
Since there are no more digits in the dividend, we add a zero to the remainder making it 950, and continue the process.

Going ahead to step 13:
950 divided by 385 is 2 with a remainder of 180.
Record the quotient 2 as the next digit in the result. 
Result so far: 105969.27532
If we take 770 away from 950, we end up with 180.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1800, and continue the process.

Advancing to step 14:
385 can be fit into 1800 4 times, resulting in a remainder of 260.
Write down 4 as next digit of the result. 
Result so far: 105969.275324
Subtracting 1540 from 1800 leaves us with 260.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2600, and continue the process.

Step 15:
385 can be fit into 2600 6 times, resulting in a remainder of 290.
The number 6 becomes the next digit in our result. 
Result so far: 105969.2753246
If we subtract 2310 from 2600, we get 290.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2900, and continue the process.

Let's proceed to step 16:
385 goes into 2900 7 times with a remainder of 205.
Write down 7 as next digit of the result. 
Result so far: 105969.27532467
If we subtract 2695 from 2900, we get 205.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2050, and continue the process.

Our division results in 105969.27532467 with a remaining 2.05e-07.