335586 ÷ 40 
Let's see how many times 40 fits into 335586.

Let's proceed to step 1:
3 divided by 40 is 0 with a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 3 to get 3.
Append the next digit (3) from the dividend to 3 and continue with: 33 / 40

On to step 2:
When dividing 33 by 40, we get 0 with a remainder of 33.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 33 leaves us with 33.
Fetch the next digit (5) from the dividend, attach it to 33 and continue: 335 / 40

Step 3:
When dividing 335 by 40, we get 8 with a remainder of 15.
Put 8 as the next digit of the answer. 
Result so far: 8.0
If we subtract 320 from 335, we get 15.
Fetch the next digit (5) from the dividend, attach it to 15 and continue: 155 / 40

Moving on to step 4:
When dividing 155 by 40, we get 3 with a remainder of 35.
The next digit of our result is 3. 
Result so far: 83.0
Subtracting 120 from 155 leaves us with 35.
Append the next digit (8) from the dividend to 35 and continue with: 358 / 40

Step 5:
If we divide 358 by 40, we get 8 and a remainder of 38.
Write down 8 as next digit of the result. 
Result so far: 838.0
If we subtract 320 from 358, we get 38.
Append the next digit (6) from the dividend to 38 and continue with: 386 / 40

Going ahead to step 6:
40 goes into 386 9 times with a remainder of 26.
Put 9 as the next digit of the answer. 
Result so far: 8389.0
If we take 360 away from 386, we end up with 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Step 7:
If we divide 260 by 40, we get 6 and a remainder of 20.
The next digit of our result is 6. 
Result so far: 8389.6
Subtract 240 from 260 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.

Moving on to step 8:
40 can be fit into 200 5 times, resulting in a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 8389.65
The remainder is 0 after subtracting 200 from 200.
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 9:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 8389.65
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.

Step 10:
40 goes into 0 0 times with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 8389.65
Subtract 0 from 0 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.

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