# Tag Archives: HCF

Given an array arr[] of positive numbers. The task is to check if there exists any subset of any size such that after multiplying eachâ€¦ Read More
Given an array arr[] of N positive integers, the task is to find the minimum number of operations required to make the GCD of arrayâ€¦ Read More
Given an array arr[] consisting of N integers and a positive integer X, the task is to count subsequences with GCD exactly X. Examples: Input:â€¦ Read More
Given an array arr[] consisting of N integers, the task is to find the maximum length of subarray having the Greatest Common Divisor (GCD) ofâ€¦ Read More
Given a 2D array arr[][] consisting of N*N positive integers, the task is to generate an N-length array such that Greatest Common Divisors(GCD) of allâ€¦ Read More
Given two positive integers A and B, the task is to find the minimum number of increments/decrements required to be performed on either A orâ€¦ Read More
Given two arrays a[] and b[] of length n and m respectively, the task is to find Greatest Common Divisor(GCD) of {a[0] + b[i], a[1]â€¦ Read More
Given two numbers A and B, the task is to find the maximum Greatest Common Divisors(GCD) that can be obtained by adding a number Xâ€¦ Read More
Given two arrays A[] and B[] consisting of N integers, the task is to find the maximum number of 0s in the array A[] thatâ€¦ Read More
Given an array arr[] consisting of N positive integers, the task is to find all the possible distinct Greatest Common Divisors(GCDs) among all the non-emptyâ€¦ Read More
Given an array arr[] consisting of  N integers, the task for every ith element of the array is to find the number of non co-primeâ€¦ Read More
Given an array arr[] of size N and an integer K, the task is to find the maximum possible value of D, such that everyâ€¦ Read More
Given a positive integer N, the task is to print all the numbers, say K, such that K is a divisor of N and Kâ€¦ Read More
Given an integer N, the task is to count the values of K ( where 1 â‰¤ Kâ‰¤ N ), such that 1< GCD(K, N)â€¦ Read More
Given an integer N, the task to print the count numbers from the range [1, N] whose adjacent digits are not co-prime.  Two numbers Aâ€¦ Read More