We're dividing 977316 by 40 
Let's see how many times 40 fits into 977316.

Let's proceed to step 1:
40 goes into 9 0 times with a remainder of 9.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 9, we get 9.
Grab the next digit (7) from the dividend, add it to 9, then carry on: 97 / 40

Moving on to step 2:
40 goes into 97 2 times with a remainder of 17.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
Subtracting 80 from 97 leaves us with 17.
Append the next digit (7) from the dividend to 17 and continue with: 177 / 40

Step 3:
40 can be fit into 177 4 times, resulting in a remainder of 17.
The number 4 becomes the next digit in our result. 
Result so far: 24.0
Subtracting 160 from 177 leaves us with 17.
Grab the next digit (3) from the dividend, add it to 17, then carry on: 173 / 40

Let's proceed to step 4:
40 can be fit into 173 4 times, resulting in a remainder of 13.
Put 4 as the next digit of the answer. 
Result so far: 244.0
Subtracting 160 from 173 leaves us with 13.
Append the next digit (1) from the dividend to 13 and continue with: 131 / 40

On to step 5:
If we divide 131 by 40, we get 3 and a remainder of 11.
The number 3 becomes the next digit in our result. 
Result so far: 2443.0
Subtract 120 from 131 to get 11.
Append the next digit (6) from the dividend to 11 and continue with: 116 / 40

Step 6:
40 can be fit into 116 2 times, resulting in a remainder of 36.
Write down 2 as next digit of the result. 
Result so far: 24432.0
The remainder is 36 after subtracting 80 from 116.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

Step 7:
40 goes into 360 9 times with a remainder of 0.
Use 9 as the next digit of our solution. 
Result so far: 24432.9
Deduct 360 from 360 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.

Moving on to step 8:
0 divided by 40 is 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 24432.9
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 9:
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: 24432.9
Subtracting 0 from 0 leaves us 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.

The final result is 24432.9 with a remainder of 0.0.