Skip to content

# Tag Archives: prime-factor

Given two numbers X and Y, the task is to make both of them equal by repeatedly multiplying with their prime factors minimum number of… Read More
Given an integer N, the task is to count the number of integers from the range [1, N] having at least one in common prime… Read More
Given a positive integer N, the task is to find the absolute difference of the count of odd and even factors of N. Examples: Input:… Read More
Given an integer K, the task is to construct an array of maximum length with product of all array elements equal to K, such that… Read More
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… Read More
Given three positive integers M, X, and Y, the task is to find the minimum number of operations required to make X and Y equal… Read More
Given an integer N, the task is to count the number of ways in which N can be expressed as an exponent, i.e., xy, where… Read More
Given two arrays A[] and B[] consisting of N and M integers respectively, the task is to count pairs (A[i], B[j]) such that the product… Read More
Given an integer N, the task is to count the number of prime factors of N!. Examples: Input: N = 5Output: 3Explanation: Factorial of 5… Read More
Given an array arr[] of size N, the task is to find the count of distinct prime factors of each element of the given array.… Read More
Given an array arr[] consisting of N positive integers and an integer K, the task is to find the maximum sum of array elements in… Read More
Given an array arr[] consisting of N integers, the task is to count the number of integers in the range [1, arr[i]] that does not… Read More
Given an array arr[] of size N, the task is to find the maximum sum possible of the count of distinct prime factors of K… Read More
Given two integers L and R, the task is to calculate the count of numbers from the range [L, R] having exactly 5 distinct positive… Read More
Given an array arr[] consisting of N positive integers, the task is to find the sum of factors of product of all array elements. Since… Read More