Updated num_divisors to unwrap prime factors from Option.
Unwrap prime factors in solution for 3.