files
This commit is contained in:
9
python/14-largest-prime-factor/README.md
Normal file
9
python/14-largest-prime-factor/README.md
Normal file
@ -0,0 +1,9 @@
|
||||
Largest Prime Factor
|
||||
====================
|
||||
|
||||
Write a function that takes a number as input, and returns the largest prime factor of a given number. If the number is prime itself, then it's largest prime factor is itself.
|
||||
|
||||
largest_prime(15) ### 5
|
||||
largest_prime(18) ### 3
|
||||
largest_prime(19) ### 19
|
||||
largest_prime(302) ### 151
|
1
python/14-largest-prime-factor/primes.py
Normal file
1
python/14-largest-prime-factor/primes.py
Normal file
@ -0,0 +1 @@
|
||||
def largest_prime(number):
|
Reference in New Issue
Block a user