# Tag Archives: GCD-LCM

Given n fractions as two arrays Num and Den. The task is to find out the L.C.M of the fractions. Examples:  Input: num[] = {1,… Read More
Given a number A and L.C.M and H.C.F. The task is to determine the other number B.Examples:   Input: A = 10, Lcm = 10, Hcf… Read More
Given two number A and B, the task is to find the sum of common factors of two numbers A and B. The numbers A… Read More
Given a number N, the task is to find the sum of all the multiples of A and B below N.Examples:   Input:N = 11, A=… Read More
Given sum and gcd of two numbers and . The task is to find both the numbers a and b. If the numbers do not exist then… Read More
Given an array of elements where each element in the array represents the degree ( 0 <= a[i] <= 359 ) at which there is already… Read More
Given an array arr which represents the different angles at which a circle is cut, the task is to determine the minimum number of more… Read More
Given three numbers a, b, n. Find GCD(an, b).Examples:   Input : a = 2, b = 3, n = 3 Output : 1 2^3 =… Read More
Given four integers x, y, z and n, the task is to find the largest n digit number which is divisible by x, y and… Read More
Given a rectangular sheet of length l and width w. we need to divide this sheet into square sheets such that the number of square… Read More
Given a range, we need to check if is their any pairs in the segment whose GCD is divisible by k.Examples:   Input : l=4, r=6,… Read More
Given two integers and . The task is to find the Nth term which is divisible by either of or .Examples :   Input : a = 2, b =… Read More
You are given an array of N integer values and M update operations. An update consists of choosing an element of the array and dividing… Read More
Given a set containing N elements, you are allowed to add an element Z > 0 to this set only if it can be represented… Read More
Given a range from L to R and every Xth tile is painted black and every Yth tile is painted white in that range from… Read More