##
Minimum gcd operations to make all array elements one
November 19, 2017

Given an array A[] of size N. You can replace any number in the array with the gcd of that element with any of its… Read More »

November 19, 2017

Given an array A[] of size N. You can replace any number in the array with the gcd of that element with any of its… Read More »

November 17, 2017

Given an array of n integers. The array is considered best if GCD of all its elements is greater than 1. If the array is… Read More »

November 13, 2017

Given two numbers n and m. Find the biggest integer a(gcd), such that all integers n, n + 1, n + 2, …, m are… Read More »

November 11, 2017

Given two numbers m and n. Find the GCD of the their factorial. Examples: Input : n = 3, m = 4 Output : 6… Read More »

November 3, 2017

Co-prime or mutually prime pair are those pair of numbers whose GCD is 1. Given a number n represent the number as the sum of… Read More »

November 2, 2017

Co-prime or mutually prime pair are those pair of numbers whose GCD is 1. Given an array of size n, find number of Co-Prime or… Read More »

October 29, 2017

The greatest common divisor (GCD) of two or more numbers, which are not all zero, is the largest positive number that divides each of the… Read More »

October 23, 2017

Given a number n, find LCM of its digits. Examples: Input : 397 Output : 63 LCM of 3, 9 and 7 is 63. Input… Read More »

October 22, 2017

Given two arrays of n integers with values of array being small (values never exceed a small number say 100). Find the pair(x, y) which… Read More »

October 18, 2017

Given two integers. We need to find if the first number x is divisible by all prime divisors of y. Examples: Input : x =… Read More »

October 14, 2017

The lowest Common Denominator or Least Common Denominator is the Least Common Multiple of the denominators of a set of fractions. Common denominator : when… Read More »

October 12, 2017

Given a number n, find GCD of its digits. Examples: Input : 345 Output : 1 GCD of 3, 4 and 5 is 1. Input… Read More »

October 9, 2017

Given an integer n, print m increasing numbers such that the sum of m numbers is equal to n and the GCD of m numbers… Read More »

October 2, 2017

Two numbers A and B are said to be Co-Prime or mutually prime if the Greatest Common Divisor of them is 1. You have been… Read More »

September 21, 2017

Two integers n and k are given. Our task is to print K-rounding of n. K-rounding is the minimum positive integer X, such that x… Read More »