Given a number N, the task is to find the distinct Prime Factors of N. Examples: Input: N = 12Output: 2 3Explanation: The factors of… Read More

# Tag Archives: prime-factor

Given an array arr[] of size N. The task is to sort the elements in arr[] based to their Highest Degree of Expression, in descending… Read More

Given a positive integer N, the task is to find the largest number in the range [1, N] such that the square root of the… Read More

Given a binary string S of size N and an array arr[] of M integers, the task is to find the final string after flipping… Read More

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