317166 ÷ 8 
We want to divide 317166 by 8.

Going ahead to step 1:
8 can be fit into 3 0 times, resulting in a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 3 leaves us with 3.
Append the next digit (1) from the dividend to 3 and continue with: 31 / 8

On to step 2:
8 can be fit into 31 3 times, resulting in a remainder of 7.
Record the quotient 3 as the next digit in the result. 
Result so far: 3.0
Subtract 24 from 31 to get 7.
Bring next digit (7) of the dividend behind the 7 and repeat the process: 77 / 8

Moving on to step 3:
When dividing 77 by 8, we get 9 with a remainder of 5.
The next digit of our result is 9. 
Result so far: 39.0
Subtract 72 from 77 to get 5.
Fetch the next digit (1) from the dividend, attach it to 5 and continue: 51 / 8

On to step 4:
8 goes into 51 6 times with a remainder of 3.
Put 6 as the next digit of the answer. 
Result so far: 396.0
The remainder is 3 after subtracting 48 from 51.
Take the next digit (6) from the dividend and append it to 3, then repeat: 36 / 8

Let's proceed to step 5:
36 divided by 8 is 4 with a remainder of 4.
Write down 4 as next digit of the result. 
Result so far: 3964.0
If we subtract 32 from 36, we get 4.
Include the next digit (6) from the dividend after 4, then repeat: 46 / 8

Step 6:
If we divide 46 by 8, we get 5 and a remainder of 6.
Use 5 as the next digit of our solution. 
Result so far: 39645.0
Subtract 40 from 46 to get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Advancing to step 7:
When dividing 60 by 8, we get 7 with a remainder of 4.
The number 7 becomes the next digit in our result. 
Result so far: 39645.7
Deduct 56 from 60 and we're left with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Let's proceed to step 8:
40 divided by 8 is 5 with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 39645.75
If we subtract 40 from 40, 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 9:
When dividing 0 by 8, we get 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 39645.75
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 10:
If we divide 0 by 8, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 39645.75
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.

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