766787 divided by 40 
Let's see how many times 40 fits into 766787.

Advancing to step 1:
If we divide 7 by 40, we get 0 and a remainder of 7.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 7 and we're left with 7.
Bring next digit (6) of the dividend behind the 7 and repeat the process: 76 / 40

On to step 2:
When dividing 76 by 40, we get 1 with a remainder of 36.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Subtracting 40 from 76 leaves us with 36.
Fetch the next digit (6) from the dividend, attach it to 36 and continue: 366 / 40

Let's proceed to step 3:
40 goes into 366 9 times with a remainder of 6.
The next digit of our result is 9. 
Result so far: 19.0
Subtracting 360 from 366 leaves us with 6.
Append the next digit (7) from the dividend to 6 and continue with: 67 / 40

Moving on to step 4:
40 can be fit into 67 1 times, resulting in a remainder of 27.
The number 1 becomes the next digit in our result. 
Result so far: 191.0
If we take 40 away from 67, we end up with 27.
Fetch the next digit (8) from the dividend, attach it to 27 and continue: 278 / 40

Going ahead to step 5:
40 goes into 278 6 times with a remainder of 38.
Use 6 as the next digit of our solution. 
Result so far: 1916.0
If we subtract 240 from 278, we get 38.
Grab the next digit (7) from the dividend, add it to 38, then carry on: 387 / 40

Advancing to step 6:
40 can be fit into 387 9 times, resulting in a remainder of 27.
Write down 9 as next digit of the result. 
Result so far: 19169.0
Subtracting 360 from 387 leaves us with 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Going ahead to step 7:
If we divide 270 by 40, we get 6 and a remainder of 30.
Write down 6 as next digit of the result. 
Result so far: 19169.6
If we subtract 240 from 270, we get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

On to step 8:
40 goes into 300 7 times with a remainder of 20.
Put 7 as the next digit of the answer. 
Result so far: 19169.67
Subtracting 280 from 300 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Let's proceed to step 9:
200 divided by 40 is 5 with a remainder of 0.
The next digit of our result is 5. 
Result so far: 19169.675
If we subtract 200 from 200, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 19169.675
If we take 0 away from 0, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Let's proceed to step 11:
0 divided by 40 is 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 19169.675
If we subtract 0 from 0, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The final outcome is 19169.675, with a leftover of 0.0.