40787291 divided by 596 
We want to figure out the number of times 40787291 can be divided by 596.

Going ahead to step 1:
If we divide 4 by 596, we get 0 and a remainder of 4.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 4 and we're left with 4.
Include the next digit (0) from the dividend after 4, then repeat: 40 / 596

Advancing to step 2:
If we divide 40 by 596, we get 0 and a remainder of 40.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 40, we get 40.
Take the next digit (7) from the dividend and append it to 40, then repeat: 407 / 596

Step 3:
596 goes into 407 0 times with a remainder of 407.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 407 after subtracting 0 from 407.
Include the next digit (8) from the dividend after 407, then repeat: 4078 / 596

Advancing to step 4:
When dividing 4078 by 596, we get 6 with a remainder of 502.
Put 6 as the next digit of the answer. 
Result so far: 6.0
Subtract 3576 from 4078 to get 502.
Take the next digit (7) from the dividend and append it to 502, then repeat: 5027 / 596

Advancing to step 5:
596 can be fit into 5027 8 times, resulting in a remainder of 259.
The next digit of our result is 8. 
Result so far: 68.0
Deduct 4768 from 5027 and we're left with 259.
Fetch the next digit (2) from the dividend, attach it to 259 and continue: 2592 / 596

Going ahead to step 6:
596 goes into 2592 4 times with a remainder of 208.
Record the quotient 4 as the next digit in the result. 
Result so far: 684.0
If we subtract 2384 from 2592, we get 208.
Fetch the next digit (9) from the dividend, attach it to 208 and continue: 2089 / 596

Advancing to step 7:
The number 596 fits into 2089 3 times, leaving a remainder of 301.
Write down 3 as next digit of the result. 
Result so far: 6843.0
If we take 1788 away from 2089, we end up with 301.
Append the next digit (1) from the dividend to 301 and continue with: 3011 / 596

Step 8:
When dividing 3011 by 596, we get 5 with a remainder of 31.
Use 5 as the next digit of our solution. 
Result so far: 68435.0
Deduct 2980 from 3011 and we're left 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.

Let's proceed to step 9:
596 can be fit into 310 0 times, resulting in a remainder of 310.
Write down 0 as next digit of the result. 
Result so far: 68435.0
If we subtract 0 from 310, we get 310.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3100, and continue the process.

Going ahead to step 10:
If we divide 3100 by 596, we get 5 and a remainder of 120.
Put 5 as the next digit of the answer. 
Result so far: 68435.05
The remainder is 120 after subtracting 2980 from 3100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1200, and continue the process.

Advancing to step 11:
596 can be fit into 1200 2 times, resulting in a remainder of 8.
The next digit of our result is 2. 
Result so far: 68435.052
The remainder is 8 after subtracting 1192 from 1200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

On to step 12:
596 can be fit into 80 0 times, resulting in a remainder of 80.
Put 0 as the next digit of the answer. 
Result so far: 68435.052
The remainder is 80 after subtracting 0 from 80.
Since there are no more digits in the dividend, we add a zero to the remainder making it 800, and continue the process.

Going ahead to step 13:
When dividing 800 by 596, we get 1 with a remainder of 204.
The next digit of our result is 1. 
Result so far: 68435.05201
Deduct 596 from 800 and we're left with 204.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2040, and continue the process.

Let's proceed to step 14:
If we divide 2040 by 596, we get 3 and a remainder of 252.
The number 3 becomes the next digit in our result. 
Result so far: 68435.052013
Subtract 1788 from 2040 to get 252.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2520, and continue the process.

Going ahead to step 15:
If we divide 2520 by 596, we get 4 and a remainder of 136.
The next digit of our result is 4. 
Result so far: 68435.0520134
If we subtract 2384 from 2520, we get 136.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1360, and continue the process.

Moving on to step 16:
When dividing 1360 by 596, we get 2 with a remainder of 168.
Put 2 as the next digit of the answer. 
Result so far: 68435.05201342
If we take 1192 away from 1360, we end up with 168.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1680, and continue the process.

The final outcome is 68435.05201342, with a leftover of 1.68e-07.