We divide 39716678 by 40
We're looking to find how many times 40 goes into 39716678.

Going ahead to step 1:
40 goes into 3 0 times with a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we take 0 away from 3, we end up with 3.
Bring next digit (9) of the dividend behind the 3 and repeat the process: 39 / 40

On to step 2:
40 can be fit into 39 0 times, resulting in a remainder of 39.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 39, we get 39.
Fetch the next digit (7) from the dividend, attach it to 39 and continue: 397 / 40

Going ahead to step 3:
When dividing 397 by 40, we get 9 with a remainder of 37.
The next digit of our result is 9. 
Result so far: 9.0
The remainder is 37 after subtracting 360 from 397.
Include the next digit (1) from the dividend after 37, then repeat: 371 / 40

Advancing to step 4:
371 divided by 40 is 9 with a remainder of 11.
Record the quotient 9 as the next digit in the result. 
Result so far: 99.0
Subtracting 360 from 371 leaves us with 11.
Fetch the next digit (6) from the dividend, attach it to 11 and continue: 116 / 40

Let's proceed to step 5:
The number 40 fits into 116 2 times, leaving a remainder of 36.
The next digit of our result is 2. 
Result so far: 992.0
Subtracting 80 from 116 leaves us with 36.
Bring next digit (6) of the dividend behind the 36 and repeat the process: 366 / 40

On to step 6:
366 divided by 40 is 9 with a remainder of 6.
Write down 9 as next digit of the result. 
Result so far: 9929.0
If we take 360 away from 366, we end up with 6.
Grab the next digit (7) from the dividend, add it to 6, then carry on: 67 / 40

On to step 7:
The number 40 fits into 67 1 times, leaving a remainder of 27.
Use 1 as the next digit of our solution. 
Result so far: 99291.0
Subtract 40 from 67 to get 27.
Grab the next digit (8) from the dividend, add it to 27, then carry on: 278 / 40

Let's proceed to step 8:
40 can be fit into 278 6 times, resulting in a remainder of 38.
Write down 6 as next digit of the result. 
Result so far: 992916.0
Deduct 240 from 278 and we're left with 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

Let's proceed to step 9:
40 can be fit into 380 9 times, resulting in a remainder of 20.
Use 9 as the next digit of our solution. 
Result so far: 992916.9
Subtract 360 from 380 to get 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 10:
When dividing 200 by 40, we get 5 with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 992916.95
Subtract 200 from 200 to 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.

On to step 11:
When dividing 0 by 40, we get 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 992916.95
Deduct 0 from 0 and we're left 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 12:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 992916.95
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.

In conclusion, the division gives 992916.95 with a balance of 0.0.