File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 8
8
"""
9
9
10
10
11
- def solution (n ) :
11
+ def solution (n : int = 20 ) -> int :
12
12
"""Returns the smallest positive number that is evenly divisible(divisible
13
13
with no remainder) by all of the numbers from 1 to n.
14
14
Original file line number Diff line number Diff line change 9
9
""" Euclidean GCD Algorithm """
10
10
11
11
12
- def gcd (x , y ) :
12
+ def gcd (x : int , y : int ) -> int :
13
13
return x if y == 0 else gcd (y , x % y )
14
14
15
15
16
16
""" Using the property lcm*gcd of two numbers = product of them """
17
17
18
18
19
- def lcm (x , y ) :
19
+ def lcm (x : int , y : int ) -> int :
20
20
return (x * y ) // gcd (x , y )
21
21
22
22
23
- def solution (n ) :
23
+ def solution (n : int = 20 ) -> int :
24
24
"""Returns the smallest positive number that is evenly divisible(divisible
25
25
with no remainder) by all of the numbers from 1 to n.
26
26
You can’t perform that action at this time.
0 commit comments