506165 divided by 5 
We want to figure out the number of times 506165 can be divided by 5.

Let's proceed to step 1:
If we divide 5 by 5, we get 1 and a remainder of 0.
Put 1 as the next digit of the answer. 
Result so far: 1.0
The remainder is 0 after subtracting 5 from 5.
Grab the next digit (0) from the dividend, add it to 0, then carry on: 0 / 5

On to step 2:
5 goes into 0 0 times with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 10.0
If we subtract 0 from 0, we get 0.
Take the next digit (6) from the dividend and append it to 0, then repeat: 6 / 5

Let's proceed to step 3:
The number 5 fits into 6 1 times, leaving a remainder of 1.
Record the quotient 1 as the next digit in the result. 
Result so far: 101.0
If we subtract 5 from 6, we get 1.
Grab the next digit (1) from the dividend, add it to 1, then carry on: 11 / 5

Step 4:
When dividing 11 by 5, we get 2 with a remainder of 1.
The next digit of our result is 2. 
Result so far: 1012.0
If we subtract 10 from 11, we get 1.
Include the next digit (6) from the dividend after 1, then repeat: 16 / 5

Advancing to step 5:
If we divide 16 by 5, we get 3 and a remainder of 1.
Write down 3 as next digit of the result. 
Result so far: 10123.0
Subtract 15 from 16 to get 1.
Include the next digit (5) from the dividend after 1, then repeat: 15 / 5

On to step 6:
When dividing 15 by 5, we get 3 with a remainder of 0.
Write down 3 as next digit of the result. 
Result so far: 101233.0
If we take 15 away from 15, 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.

Step 7:
0 divided by 5 is 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 101233.0
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.

Advancing to step 8:
5 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 101233.0
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.

The final result is 101233.0 with a remainder of 0.0.