We're dividing 40378997 by 361 
We want to divide 40378997 by 361.

On to step 1:
If we divide 4 by 361, we get 0 and a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 4 after subtracting 0 from 4.
Include the next digit (0) from the dividend after 4, then repeat: 40 / 361

Moving on to step 2:
361 can be fit into 40 0 times, resulting in 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 (3) from the dividend after 40, then repeat: 403 / 361

Moving on to step 3:
361 can be fit into 403 1 times, resulting in a remainder of 42.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtract 361 from 403 to get 42.
Append the next digit (7) from the dividend to 42 and continue with: 427 / 361

Moving on to step 4:
The number 361 fits into 427 1 times, leaving a remainder of 66.
The number 1 becomes the next digit in our result. 
Result so far: 11.0
Subtracting 361 from 427 leaves us with 66.
Include the next digit (8) from the dividend after 66, then repeat: 668 / 361

Let's proceed to step 5:
361 can be fit into 668 1 times, resulting in a remainder of 307.
Write down 1 as next digit of the result. 
Result so far: 111.0
If we subtract 361 from 668, we get 307.
Include the next digit (9) from the dividend after 307, then repeat: 3079 / 361

Let's proceed to step 6:
If we divide 3079 by 361, we get 8 and a remainder of 191.
The number 8 becomes the next digit in our result. 
Result so far: 1118.0
If we subtract 2888 from 3079, we get 191.
Take the next digit (9) from the dividend and append it to 191, then repeat: 1919 / 361

Going ahead to step 7:
361 goes into 1919 5 times with a remainder of 114.
Put 5 as the next digit of the answer. 
Result so far: 11185.0
The remainder is 114 after subtracting 1805 from 1919.
Grab the next digit (7) from the dividend, add it to 114, then carry on: 1147 / 361

Step 8:
When dividing 1147 by 361, we get 3 with a remainder of 64.
Write down 3 as next digit of the result. 
Result so far: 111853.0
The remainder is 64 after subtracting 1083 from 1147.
Since there are no more digits in the dividend, we add a zero to the remainder making it 640, and continue the process.

Moving on to step 9:
If we divide 640 by 361, we get 1 and a remainder of 279.
Write down 1 as next digit of the result. 
Result so far: 111853.1
If we subtract 361 from 640, we get 279.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2790, and continue the process.

Step 10:
2790 divided by 361 is 7 with a remainder of 263.
Record the quotient 7 as the next digit in the result. 
Result so far: 111853.17
Subtract 2527 from 2790 to get 263.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2630, and continue the process.

Let's proceed to step 11:
2630 divided by 361 is 7 with a remainder of 103.
Record the quotient 7 as the next digit in the result. 
Result so far: 111853.177
The remainder is 103 after subtracting 2527 from 2630.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1030, and continue the process.

After the division, we end up with 111853.177 and a remainder of 0.0103.