Last active
December 8, 2022 22:32
-
-
Save niczky12/8a32cbc36cc5657e28e41c7c745eeba3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Primes | |
num_prime_divisors(n) = length(keys(Primes.factor(n))) | |
@test num_prime_divisors(1) == 0 | |
@test num_prime_divisors(2) == 1 | |
@test num_prime_divisors(3) == 1 | |
@test num_prime_divisors(4) == 1 | |
@test num_prime_divisors(12) == 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment