The GCD of given numbers is 5.
Step 1 :
Divide $ 62839955 $ by $ 500000 $ and get the remainder
The remainder is positive ($ 339955 > 0 $), so we will continue with division.
Step 2 :
Divide $ 500000 $ by $ \color{blue}{ 339955 } $ and get the remainder
The remainder is still positive ($ 160045 > 0 $), so we will continue with division.
Step 3 :
Divide $ 339955 $ by $ \color{blue}{ 160045 } $ and get the remainder
The remainder is still positive ($ 19865 > 0 $), so we will continue with division.
Step 4 :
Divide $ 160045 $ by $ \color{blue}{ 19865 } $ and get the remainder
The remainder is still positive ($ 1125 > 0 $), so we will continue with division.
Step 5 :
Divide $ 19865 $ by $ \color{blue}{ 1125 } $ and get the remainder
The remainder is still positive ($ 740 > 0 $), so we will continue with division.
Step 6 :
Divide $ 1125 $ by $ \color{blue}{ 740 } $ and get the remainder
The remainder is still positive ($ 385 > 0 $), so we will continue with division.
Step 7 :
Divide $ 740 $ by $ \color{blue}{ 385 } $ and get the remainder
The remainder is still positive ($ 355 > 0 $), so we will continue with division.
Step 8 :
Divide $ 385 $ by $ \color{blue}{ 355 } $ and get the remainder
The remainder is still positive ($ 30 > 0 $), so we will continue with division.
Step 9 :
Divide $ 355 $ by $ \color{blue}{ 30 } $ and get the remainder
The remainder is still positive ($ 25 > 0 $), so we will continue with division.
Step 10 :
Divide $ 30 $ by $ \color{blue}{ 25 } $ and get the remainder
The remainder is still positive ($ 5 > 0 $), so we will continue with division.
Step 11 :
Divide $ 25 $ by $ \color{blue}{ 5 } $ and get the remainder
The remainder is zero => GCD is the last divisor $ \color{blue}{ \boxed { 5 }} $.
We can summarize an algorithm into a following table.
| 62839955 | : | 500000 | = | 125 | remainder ( 339955 ) | ||||||||||||||||||||
| 500000 | : | 339955 | = | 1 | remainder ( 160045 ) | ||||||||||||||||||||
| 339955 | : | 160045 | = | 2 | remainder ( 19865 ) | ||||||||||||||||||||
| 160045 | : | 19865 | = | 8 | remainder ( 1125 ) | ||||||||||||||||||||
| 19865 | : | 1125 | = | 17 | remainder ( 740 ) | ||||||||||||||||||||
| 1125 | : | 740 | = | 1 | remainder ( 385 ) | ||||||||||||||||||||
| 740 | : | 385 | = | 1 | remainder ( 355 ) | ||||||||||||||||||||
| 385 | : | 355 | = | 1 | remainder ( 30 ) | ||||||||||||||||||||
| 355 | : | 30 | = | 11 | remainder ( 25 ) | ||||||||||||||||||||
| 30 | : | 25 | = | 1 | remainder ( 5 ) | ||||||||||||||||||||
| 25 | : | 5 | = | 5 | remainder ( 0 ) | ||||||||||||||||||||
| GCD = 5 | |||||||||||||||||||||||||
This solution can be visualized using a Venn diagram.
The GCD equals the product of the numbers at the intersection.