Let's divide 31845 by 87
Our goal is to divide 31845 by 87.

Let's proceed to step 1:
3 divided by 87 is 0 with a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 3, we end up with 3.
Fetch the next digit (1) from the dividend, attach it to 3 and continue: 31 / 87

Moving on to step 2:
87 goes into 31 0 times with a remainder of 31.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 31 after subtracting 0 from 31.
Append the next digit (8) from the dividend to 31 and continue with: 318 / 87

Let's proceed to step 3:
318 divided by 87 is 3 with a remainder of 57.
Record the quotient 3 as the next digit in the result. 
Result so far: 3.0
Subtracting 261 from 318 leaves us with 57.
Take the next digit (4) from the dividend and append it to 57, then repeat: 574 / 87

Advancing to step 4:
87 goes into 574 6 times with a remainder of 52.
Put 6 as the next digit of the answer. 
Result so far: 36.0
Deduct 522 from 574 and we're left with 52.
Take the next digit (5) from the dividend and append it to 52, then repeat: 525 / 87

Moving on to step 5:
If we divide 525 by 87, we get 6 and a remainder of 3.
Put 6 as the next digit of the answer. 
Result so far: 366.0
Deduct 522 from 525 and we're left with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Going ahead to step 6:
The number 87 fits into 30 0 times, leaving a remainder of 30.
Use 0 as the next digit of our solution. 
Result so far: 366.0
Subtract 0 from 30 to 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.

Advancing to step 7:
The number 87 fits into 300 3 times, leaving a remainder of 39.
Write down 3 as next digit of the result. 
Result so far: 366.03
If we take 261 away from 300, we end up with 39.
Since there are no more digits in the dividend, we add a zero to the remainder making it 390, and continue the process.

On to step 8:
When dividing 390 by 87, we get 4 with a remainder of 42.
Use 4 as the next digit of our solution. 
Result so far: 366.034
The remainder is 42 after subtracting 348 from 390.
Since there are no more digits in the dividend, we add a zero to the remainder making it 420, and continue the process.

Let's proceed to step 9:
When dividing 420 by 87, we get 4 with a remainder of 72.
Put 4 as the next digit of the answer. 
Result so far: 366.0344
If we subtract 348 from 420, we get 72.
Since there are no more digits in the dividend, we add a zero to the remainder making it 720, and continue the process.

The final outcome is 366.0344, with a leftover of 0.00072.