# Tag Archives: prime-factor

Given an integer N, you have to find two proper factors of N such that their sum is coprime with the given integer N. If… Read More
Given an positive integer N, the task is to find the number of triplets (X, Y, Z) such that the sum of product of any… Read More
Given a positive integer N, the task is to generate a sequence say arr[] of maximum length having all elements at least 2 such that… Read More
Given an array arr[] of size N,  the task is to count the number of non-empty subsets whose product is equal to P1×P2×P3×……..×Pk  where P1,… Read More
Given a positive integer N and a string S initially it is “A”, the task is to minimize the number of operations required to form… Read More
Given a number N, the task is to find the sum of all the prime factors of N.  Examples: Input: 10Output: 7Explanation: 2, 5 are… Read More
Given a number N (N > 6), the task is to print the prime factorization of a number Z, where Z is the product of… Read More
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