We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defprimeCount(n):# Write your code hereprime_num=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]prime_products=[1]forpinprime_num:prime_products.append(prime_products[-1]*p)foriinrange(1,len(prime_products)):ifn<prime_products[i]:returni-1
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Leonardo's Prime Factors
You are viewing a single comment's thread. Return to all comments →