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:...
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....
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:...
Given a positive integer N, the task is to find the absolute difference of the count of odd and even factors of N....
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....
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:...
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....
Given a natural number n, print all distinct divisors of it....
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....
Given two numbers, fact and n, find the largest power of n that divides fact! (Factorial of fact)....
Given a positive integer n, we have to find the total number of divisors for n....
Given two numbers k and n, find the largest power of k that divides n! Constraints: K > 1...