40591831 divided by 666 
Let's see how many times 666 fits into 40591831.

Moving on to step 1:
The number 666 fits into 4 0 times, leaving a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Grab the next digit (0) from the dividend, add it to 4, then carry on: 40 / 666

Let's proceed to step 2:
40 divided by 666 is 0 with a remainder of 40.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 40 leaves us with 40.
Include the next digit (5) from the dividend after 40, then repeat: 405 / 666

Advancing to step 3:
If we divide 405 by 666, we get 0 and a remainder of 405.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 405, we get 405.
Grab the next digit (9) from the dividend, add it to 405, then carry on: 4059 / 666

On to step 4:
When dividing 4059 by 666, we get 6 with a remainder of 63.
Use 6 as the next digit of our solution. 
Result so far: 6.0
Deduct 3996 from 4059 and we're left with 63.
Include the next digit (1) from the dividend after 63, then repeat: 631 / 666

Advancing to step 5:
666 goes into 631 0 times with a remainder of 631.
The number 0 becomes the next digit in our result. 
Result so far: 60.0
Subtracting 0 from 631 leaves us with 631.
Fetch the next digit (8) from the dividend, attach it to 631 and continue: 6318 / 666

Going ahead to step 6:
When dividing 6318 by 666, we get 9 with a remainder of 324.
Record the quotient 9 as the next digit in the result. 
Result so far: 609.0
Deduct 5994 from 6318 and we're left with 324.
Append the next digit (3) from the dividend to 324 and continue with: 3243 / 666

Advancing to step 7:
666 can be fit into 3243 4 times, resulting in a remainder of 579.
Use 4 as the next digit of our solution. 
Result so far: 6094.0
Deduct 2664 from 3243 and we're left with 579.
Append the next digit (1) from the dividend to 579 and continue with: 5791 / 666

Step 8:
666 goes into 5791 8 times with a remainder of 463.
The next digit of our result is 8. 
Result so far: 60948.0
Subtract 5328 from 5791 to get 463.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4630, and continue the process.

Advancing to step 9:
4630 divided by 666 is 6 with a remainder of 634.
Use 6 as the next digit of our solution. 
Result so far: 60948.6
Deduct 3996 from 4630 and we're left with 634.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6340, and continue the process.

Let's proceed to step 10:
666 goes into 6340 9 times with a remainder of 346.
The next digit of our result is 9. 
Result so far: 60948.69
Deduct 5994 from 6340 and we're left with 346.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3460, and continue the process.

Going ahead to step 11:
When dividing 3460 by 666, we get 5 with a remainder of 130.
The number 5 becomes the next digit in our result. 
Result so far: 60948.695
Subtract 3330 from 3460 to get 130.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1300, and continue the process.

Moving on to step 12:
1300 divided by 666 is 1 with a remainder of 634.
Use 1 as the next digit of our solution. 
Result so far: 60948.6951
Deduct 666 from 1300 and we're left with 634.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6340, and continue the process.

Moving on to step 13:
666 goes into 6340 9 times with a remainder of 346.
Put 9 as the next digit of the answer. 
Result so far: 60948.69519
Subtract 5994 from 6340 to get 346.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3460, and continue the process.

Moving on to step 14:
If we divide 3460 by 666, we get 5 and a remainder of 130.
The next digit of our result is 5. 
Result so far: 60948.695195
The remainder is 130 after subtracting 3330 from 3460.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1300, and continue the process.

On to step 15:
When dividing 1300 by 666, we get 1 with a remainder of 634.
Put 1 as the next digit of the answer. 
Result so far: 60948.6951951
Subtracting 666 from 1300 leaves us with 634.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6340, and continue the process.

Step 16:
When dividing 6340 by 666, we get 9 with a remainder of 346.
The next digit of our result is 9. 
Result so far: 60948.69519519
Deduct 5994 from 6340 and we're left with 346.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3460, and continue the process.

After the division, we end up with 60948.69519519 and a remainder of 3.46e-07.