171271 divided by 40 
We want to figure out the number of times 171271 can be divided by 40.

On to step 1:
When dividing 1 by 40, we get 0 with a remainder of 1.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 1, we end up with 1.
Include the next digit (7) from the dividend after 1, then repeat: 17 / 40

On to step 2:
The number 40 fits into 17 0 times, leaving a remainder of 17.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 17, we end up with 17.
Append the next digit (1) from the dividend to 17 and continue with: 171 / 40

Advancing to step 3:
40 can be fit into 171 4 times, resulting in a remainder of 11.
The next digit of our result is 4. 
Result so far: 4.0
If we subtract 160 from 171, we get 11.
Append the next digit (2) from the dividend to 11 and continue with: 112 / 40

Let's proceed to step 4:
When dividing 112 by 40, we get 2 with a remainder of 32.
Use 2 as the next digit of our solution. 
Result so far: 42.0
If we subtract 80 from 112, we get 32.
Grab the next digit (7) from the dividend, add it to 32, then carry on: 327 / 40

Moving on to step 5:
The number 40 fits into 327 8 times, leaving a remainder of 7.
Use 8 as the next digit of our solution. 
Result so far: 428.0
Deduct 320 from 327 and we're left with 7.
Include the next digit (1) from the dividend after 7, then repeat: 71 / 40

Moving on to step 6:
40 can be fit into 71 1 times, resulting in a remainder of 31.
The number 1 becomes the next digit in our result. 
Result so far: 4281.0
If we take 40 away from 71, we end up with 31.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

Advancing to step 7:
310 divided by 40 is 7 with a remainder of 30.
Record the quotient 7 as the next digit in the result. 
Result so far: 4281.7
If we subtract 280 from 310, we get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 8:
If we divide 300 by 40, we get 7 and a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 4281.77
Subtracting 280 from 300 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

The quotient of the division is 4281.77, and the remainder is 0.02.