Let's divide 765271 by 40
Let's see how many times 40 fits into 765271.

Moving on to step 1:
The number 40 fits into 7 0 times, leaving a remainder of 7.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 7 to get 7.
Include the next digit (6) from the dividend after 7, then repeat: 76 / 40

On to step 2:
40 can be fit into 76 1 times, resulting in a remainder of 36.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Deduct 40 from 76 and we're left with 36.
Take the next digit (5) from the dividend and append it to 36, then repeat: 365 / 40

On to step 3:
40 goes into 365 9 times with a remainder of 5.
Use 9 as the next digit of our solution. 
Result so far: 19.0
The remainder is 5 after subtracting 360 from 365.
Grab the next digit (2) from the dividend, add it to 5, then carry on: 52 / 40

Going ahead to step 4:
52 divided by 40 is 1 with a remainder of 12.
Record the quotient 1 as the next digit in the result. 
Result so far: 191.0
If we subtract 40 from 52, we get 12.
Grab the next digit (7) from the dividend, add it to 12, then carry on: 127 / 40

Going ahead to step 5:
The number 40 fits into 127 3 times, leaving a remainder of 7.
Put 3 as the next digit of the answer. 
Result so far: 1913.0
Subtracting 120 from 127 leaves us with 7.
Include the next digit (1) from the dividend after 7, then repeat: 71 / 40

On to step 6:
If we divide 71 by 40, we get 1 and a remainder of 31.
Put 1 as the next digit of the answer. 
Result so far: 19131.0
The remainder is 31 after subtracting 40 from 71.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

Let's proceed to step 7:
If we divide 310 by 40, we get 7 and a remainder of 30.
Record the quotient 7 as the next digit in the result. 
Result so far: 19131.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.
Use 7 as the next digit of our solution. 
Result so far: 19131.77
The remainder is 20 after subtracting 280 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

The final result is 19131.77 with a remainder of 0.02.