40095766 divided by 331 
We want to divide 40095766 by 331.

On to step 1:
331 can be fit into 4 0 times, resulting in a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Grab the next digit (0) from the dividend, add it to 4, then carry on: 40 / 331

Moving on to step 2:
When dividing 40 by 331, we get 0 with a remainder of 40.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 40, we get 40.
Grab the next digit (0) from the dividend, add it to 40, then carry on: 400 / 331

Moving on to step 3:
The number 331 fits into 400 1 times, leaving a remainder of 69.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we take 331 away from 400, we end up with 69.
Include the next digit (9) from the dividend after 69, then repeat: 699 / 331

Let's proceed to step 4:
699 divided by 331 is 2 with a remainder of 37.
The number 2 becomes the next digit in our result. 
Result so far: 12.0
If we subtract 662 from 699, we get 37.
Take the next digit (5) from the dividend and append it to 37, then repeat: 375 / 331

Going ahead to step 5:
The number 331 fits into 375 1 times, leaving a remainder of 44.
The next digit of our result is 1. 
Result so far: 121.0
The remainder is 44 after subtracting 331 from 375.
Append the next digit (7) from the dividend to 44 and continue with: 447 / 331

On to step 6:
If we divide 447 by 331, we get 1 and a remainder of 116.
The number 1 becomes the next digit in our result. 
Result so far: 1211.0
Deduct 331 from 447 and we're left with 116.
Bring next digit (6) of the dividend behind the 116 and repeat the process: 1166 / 331

On to step 7:
The number 331 fits into 1166 3 times, leaving a remainder of 173.
Record the quotient 3 as the next digit in the result. 
Result so far: 12113.0
If we take 993 away from 1166, we end up with 173.
Bring next digit (6) of the dividend behind the 173 and repeat the process: 1736 / 331

Going ahead to step 8:
331 can be fit into 1736 5 times, resulting in a remainder of 81.
Record the quotient 5 as the next digit in the result. 
Result so far: 121135.0
If we take 1655 away from 1736, we end up with 81.
Since there are no more digits in the dividend, we add a zero to the remainder making it 810, and continue the process.

Going ahead to step 9:
When dividing 810 by 331, we get 2 with a remainder of 148.
Use 2 as the next digit of our solution. 
Result so far: 121135.2
The remainder is 148 after subtracting 662 from 810.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1480, and continue the process.

On to step 10:
When dividing 1480 by 331, we get 4 with a remainder of 156.
The number 4 becomes the next digit in our result. 
Result so far: 121135.24
If we subtract 1324 from 1480, we get 156.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1560, and continue the process.

Advancing to step 11:
When dividing 1560 by 331, we get 4 with a remainder of 236.
Write down 4 as next digit of the result. 
Result so far: 121135.244
The remainder is 236 after subtracting 1324 from 1560.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2360, and continue the process.

After the division, we end up with 121135.244 and a remainder of 0.0236.