Let's divide 522989 by 40
We're looking to find how many times 40 goes into 522989.

On to step 1:
If we divide 5 by 40, we get 0 and a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 5 leaves us with 5.
Include the next digit (2) from the dividend after 5, then repeat: 52 / 40

Step 2:
52 divided by 40 is 1 with a remainder of 12.
Write down 1 as next digit of the result. 
Result so far: 1.0
The remainder is 12 after subtracting 40 from 52.
Fetch the next digit (2) from the dividend, attach it to 12 and continue: 122 / 40

On to step 3:
When dividing 122 by 40, we get 3 with a remainder of 2.
Write down 3 as next digit of the result. 
Result so far: 13.0
Subtract 120 from 122 to get 2.
Append the next digit (9) from the dividend to 2 and continue with: 29 / 40

Moving on to step 4:
When dividing 29 by 40, we get 0 with a remainder of 29.
The number 0 becomes the next digit in our result. 
Result so far: 130.0
If we subtract 0 from 29, we get 29.
Fetch the next digit (8) from the dividend, attach it to 29 and continue: 298 / 40

Step 5:
The number 40 fits into 298 7 times, leaving a remainder of 18.
Write down 7 as next digit of the result. 
Result so far: 1307.0
Deduct 280 from 298 and we're left with 18.
Take the next digit (9) from the dividend and append it to 18, then repeat: 189 / 40

Moving on to step 6:
40 can be fit into 189 4 times, resulting in a remainder of 29.
Write down 4 as next digit of the result. 
Result so far: 13074.0
Subtracting 160 from 189 leaves us with 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Advancing to step 7:
If we divide 290 by 40, we get 7 and a remainder of 10.
Put 7 as the next digit of the answer. 
Result so far: 13074.7
Subtracting 280 from 290 leaves us with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Let's proceed to step 8:
100 divided by 40 is 2 with a remainder of 20.
Record the quotient 2 as the next digit in the result. 
Result so far: 13074.72
If we subtract 80 from 100, we 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.

Let's proceed to step 9:
40 can be fit into 200 5 times, resulting in a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 13074.725
If we subtract 200 from 200, we 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.

Going ahead to step 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 13074.725
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.

Let's proceed to step 11:
If we divide 0 by 40, we get 0 and a remainder of 0.
The next digit of our result is 0. 
Result so far: 13074.725
If we subtract 0 from 0, we 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.

In conclusion, the division gives 13074.725 with a balance of 0.0.