Given two numbers L and R (inclusive) find the product of primes within this range. Print the product modulo 109+7. If there are no primes in that range you must print 1.
- Time : O((r-l)sqrt(r))
- Space : O(1)
1 | class Solution{ |
Given two numbers L and R (inclusive) find the product of primes within this range. Print the product modulo 109+7. If there are no primes in that range you must print 1.
1 | class Solution{ |