Ordered Prime Signature
Given a number n, find the ordered prime signatures and using this find the number of divisor of given n. Any positive integer, ‘n’ can be expressed in the form of its prime factors. If ‘n’ has p1, p2, … etc. as its prime factors, then n can be expressed as : Now, arrange the obtained exponents of the prime factors of ‘n’ in non-decreasing order. The arrangement thus obtained is called the ordered prime signature of the positive integer ‘n’.Example:...
read more
Sum of array elements which are prime factors of a given number
Given an array arr[] of size N and a positive integer K, the task is to find the sum of all array elements which are prime factors of K....
read more
Count all pairs of divisors of a number N whose sum is coprime with N
Given an integer N, the task is to count all pairs of divisors of N such that the sum of each pair is coprime with N.Examples:...
read more
Absolute difference between the count of odd and even factors of N
Given a positive integer N, the task is to find the absolute difference of the count of odd and even factors of N....
read more
Minimize sum of K positive integers with given LCM
Given two positive integers K and X, the task is to find the minimum possible sum of K positive integers ( repetitions allowed ) having LCM X....
read more
Count numbers from range whose prime factors are only 2 and 3 using Arrays | Set 2
Given two positive integers L and R, the task is to count the elements from the range [L, R] whose prime factors are only 2 and 3.Examples:...
read more
Count pairs whose product contains single distinct prime factor
Given an array arr[] of size N, the task is to count the number of pairs from the given array whose product contains only a single distinct prime factor....
read more
Find all factors of a Natural Number
Given a natural number n, print all distinct divisors of it....
read more
Count number of integers less than or equal to N which has exactly 9 divisors
Given a number N(1<=N<=109), the task is to find the total number of integers less than equal to n which have exactly 9 divisors....
read more
Find maximum power of a number that divides a factorial
Given two numbers, fact and n, find the largest power of n that divides fact! (Factorial of fact)....
read more
Total number of divisors for a given number
Given a positive integer n, we have to find the total number of divisors for n....
read more
Largest power of k in n! (factorial) where k may not be prime
Given two numbers k and n, find the largest power of k that divides n!  Constraints:  K > 1...
read more