CCT QUESTIONS
Semi Prime Numbers
A natural number that can be expressed as a product of two prime numbers is called semi-prime number. For example, 77 is semi-prime since it is a product of two prime numbers, 7 and 11.
[Remember that 1 is not prime.]
Answers
Answered by
0
Answer:
Count Divisors of n in O(n^1/3)
Given a number n, count all distinct divisors of it.
Examples:
Input : 18
Output : 6
Divisors of 18 are 1, 2, 3, 6, 9 and 18.
Input : 100
Output : 9
Divisors of 100 are 1, 2, 4, 5, 10, 20,
25, 50 and 100
Recommended: Please solve it on
Similar questions