This commit is contained in:
Armen Vartan 2014-12-02 16:39:14 -05:00
parent 847ae3957d
commit 52fc94d17d

View File

@ -1,9 +1,10 @@
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
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
```