40360242 divided by 791 
We want to divide 40360242 by 791.

Going ahead to step 1:
791 goes into 4 0 times with a remainder of 4.
Write down 0 as next digit of the result. 
Result so far: 0.0
Deduct 0 from 4 and we're left with 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 791

Moving on to step 2:
The number 791 fits into 40 0 times, leaving a remainder of 40.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 40 leaves us with 40.
Append the next digit (3) from the dividend to 40 and continue with: 403 / 791

Step 3:
403 divided by 791 is 0 with a remainder of 403.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 403 leaves us with 403.
Fetch the next digit (6) from the dividend, attach it to 403 and continue: 4036 / 791

On to step 4:
When dividing 4036 by 791, we get 5 with a remainder of 81.
Write down 5 as next digit of the result. 
Result so far: 5.0
The remainder is 81 after subtracting 3955 from 4036.
Include the next digit (0) from the dividend after 81, then repeat: 810 / 791

Let's proceed to step 5:
The number 791 fits into 810 1 times, leaving a remainder of 19.
The next digit of our result is 1. 
Result so far: 51.0
Deduct 791 from 810 and we're left with 19.
Fetch the next digit (2) from the dividend, attach it to 19 and continue: 192 / 791

Going ahead to step 6:
791 can be fit into 192 0 times, resulting in a remainder of 192.
The number 0 becomes the next digit in our result. 
Result so far: 510.0
If we subtract 0 from 192, we get 192.
Fetch the next digit (4) from the dividend, attach it to 192 and continue: 1924 / 791

On to step 7:
791 can be fit into 1924 2 times, resulting in a remainder of 342.
The next digit of our result is 2. 
Result so far: 5102.0
If we take 1582 away from 1924, we end up with 342.
Append the next digit (2) from the dividend to 342 and continue with: 3422 / 791

Going ahead to step 8:
3422 divided by 791 is 4 with a remainder of 258.
Put 4 as the next digit of the answer. 
Result so far: 51024.0
Deduct 3164 from 3422 and we're left with 258.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2580, and continue the process.

Let's proceed to step 9:
When dividing 2580 by 791, we get 3 with a remainder of 207.
Put 3 as the next digit of the answer. 
Result so far: 51024.3
The remainder is 207 after subtracting 2373 from 2580.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2070, and continue the process.

Step 10:
If we divide 2070 by 791, we get 2 and a remainder of 488.
Use 2 as the next digit of our solution. 
Result so far: 51024.32
If we subtract 1582 from 2070, we get 488.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4880, and continue the process.

Let's proceed to step 11:
4880 divided by 791 is 6 with a remainder of 134.
Record the quotient 6 as the next digit in the result. 
Result so far: 51024.326
If we take 4746 away from 4880, we end up with 134.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1340, and continue the process.

Advancing to step 12:
791 goes into 1340 1 times with a remainder of 549.
The next digit of our result is 1. 
Result so far: 51024.3261
Subtracting 791 from 1340 leaves us with 549.
Since there are no more digits in the dividend, we add a zero to the remainder making it 5490, and continue the process.

Step 13:
The number 791 fits into 5490 6 times, leaving a remainder of 744.
Use 6 as the next digit of our solution. 
Result so far: 51024.32616
If we subtract 4746 from 5490, we get 744.
Since there are no more digits in the dividend, we add a zero to the remainder making it 7440, and continue the process.

Advancing to step 14:
7440 divided by 791 is 9 with a remainder of 321.
The next digit of our result is 9. 
Result so far: 51024.326169
Subtract 7119 from 7440 to get 321.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3210, and continue the process.

Advancing to step 15:
If we divide 3210 by 791, we get 4 and a remainder of 46.
Record the quotient 4 as the next digit in the result. 
Result so far: 51024.3261694
If we subtract 3164 from 3210, we get 46.
Since there are no more digits in the dividend, we add a zero to the remainder making it 460, and continue the process.

Step 16:
If we divide 460 by 791, we get 0 and a remainder of 460.
The next digit of our result is 0. 
Result so far: 51024.3261694
Subtract 0 from 460 to get 460.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4600, and continue the process.

The quotient of the division is 51024.3261694, and the remainder is 4.6e-07.