We simply multiply first set of prime numbers while the product is smaller than N .
prod *= p ; NEW_LINE if ( prod > N ) : NEW_LINE INDENT return res ; NEW_LINE DEDENT res += 1 ; NEW_LINE p += 1 ; NEW_LINE return res ; NEW_LINE