File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 11def gcd (a : int , b : int ) -> int :
22 """
3- Compute the Greatest Common Divisor (GCD) of two integers using
4- the Euclidean algorithm.
3+ Compute the Greatest Common Divisor (GCD) of two integers using
4+ the Euclidean algorithm.
55
6- The GCD is the largest positive integer that divides both numbers
7- without leaving a remainder.
6+ The GCD is the largest positive integer that divides both numbers
7+ without leaving a remainder.
88
9- >>> gcd(48, 18)
9+ >>> gcd(48, 18)
10+ 6
11+ >>> gcd(7, 5)
12+ 1
13+ >>> gcd(48, 18)
1014 6
1115 >>> gcd(7, 5)
1216 1
13- >>> gcd(48, 18)
14- 6
15- >>> gcd(7, 5)
16- 1
1717
18- :param a: first integer
19- :param b: second integer
20- :return: greatest common divisor of a and b
18+ :param a: first integer
19+ :param b: second integer
20+ :return: greatest common divisor of a and b
2121 """
You can’t perform that action at this time.
0 commit comments