# Tag Archives: GCD-LCM

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 A of size N and an integer B, the task is to find all unique quadruplets arranged in the lexicographically increasing order… Read More
Given an integer array arr[] of size N, the task is to calculate the total number of distinct Greatest Common Divisors(GCDs) among all the non-empty… Read More
Given a range L to R, the task is to find the maximum possible value of GCD(X, Y) such that X and Y belongs to… Read More
Given an array A[] containing N positive integers, the task is to find the largest possible number K, such that after replacing all elements by… Read More
Given three integers A, B and C. You can add or substract A, B, or 0 any number of times to form new values in… Read More
Given two integers X and Y, the task is to make both the integers equal by performing the following operations any number of times: Increase… Read More
Given L, B, and H which denotes the length, breadth, and height of a cuboid, the task is to find the minimum number of cuboids… Read More
Given two positive integers K and X, the task is to find the minimum possible sum of K positive integers ( repetitions allowed ) having… Read More
Given two numbers. The task is to find the GCD of the two numbers. Using STL : In Python, the math module contains a number… Read More
Given two integers X and Y, the task is to check if it is possible to reach (X, Y) from (1, 1) by the following… Read More
Given two numbers A and B, the task is to find the minimum number that needs to be added to A and B such that… Read More
Given an array arr[] of N integers and a positive integer K, the task is to check if it is possible to split this array… Read More
Given an array A[] consisting of N positive integers, the task is to check if all the array elements are pairwise co-prime, i.e. for all… Read More
Given an array arr[] of size N, the task is to split the entire array into a minimum number of subarrays such that for each… Read More