## Sum of GCDs of each row of the given matrix

Given a matrix mat[][] of size N * N, the task is to find the sum of GCDs of all the rows of the given… Read More »

- Reach the numbers by making jumps of two given lengths
- Make Binary Search Tree
- Number of array elements derivable from D after performing certain operations
- Smallest perfect square divisible by all elements of an array
- Find three integers less than or equal to N such that their LCM is maximum
- Program to find LCM of two Fibonnaci Numbers
- Minimum sum of the elements of an array after subtracting smaller elements from larger
- Sum of LCM(1, n), LCM(2, n), LCM(3, n), ... , LCM(n, n)
- LCM of N numbers modulo M
- Count numbers in a range that are divisible by all array elements
- Find original numbers from gcd() every pair
- Find an integer X which is divisor of all except exactly one element in an array
- Smallest integer > 1 which divides every element of the given array
- Count common prime factors of two numbers
- Minimum LCM and GCD possible among all possible sub-arrays
- Find permutation of first N natural numbers that satisfies the given condition
- Count number of sub-sequences with GCD 1
- Count numbers in a range having GCD of powers of prime factors equal to 1
- Maximum GCD of N integers with given product
- Find GCD of factorial of elements of given array
- Count of quadruplets from range [L, R] having GCD equal to K
- Time taken by two persons to meet on a circular track
- Find the winner by adding Pairwise difference of elements in the array until Possible
- Maximum length subarray with LCM equal to product
- Divide the two given numbers by their common divisors
- Minimum value that divides one number and divisible by other
- Queries to update a given index and find gcd in range
- Increasing sequence with given GCD
- Smallest perfect Cube divisible by all elements of an array
- Minimum possible final health of the last monster in a game

Given a matrix mat[][] of size N * N, the task is to find the sum of GCDs of all the rows of the given… Read More »

Given an integer K and a range [L, R], the task is to count the quadruplet pairs from the given range having gcd equal to… Read More »

Given an N-ary tree and an array val[] which stores the values associated with all the nodes. Also given are a leaf node X and… Read More »

Given two integer N and K, the task is to find the permutation P of first N natural numbers such that there are exactly K… Read More »

Given an array arr[] of N integers and queries Q. Queries are of two types: Update a given index ind by X. Find the gcd… Read More »

Given N monsters, each monster has initial health h[i] which is an integer. A monster is alive if its health is greater than 0. In… Read More »

Given two integer x and y, the task is to find the HCF of the numbers without using recursion or Euclidean method. Examples: Input: x… Read More »

Given two integers x and y and where x is divisible by y. It can be represented in the form of a fraction x/y. The… Read More »

Given an array arr[] containing GCD of every possible pair of elements of another array. The task is to find the original numbers which are… Read More »

Given five integers N, A, B, X and Y. The task is to find the maximum profit obtained from the numbers from the range [1,… Read More »

Given an array arr[], the task is to find the smallest possible integer (other than 1) which divides every element of the given array. Examples:… Read More »

Given an array with N positive integers. Find the GCD of factorials of all elements of array. Examples: Input : arr[] = {3, 4, 8,… Read More »

Given two positive integers N and M., The task is to find the smallest divisor D of N such that gcd(D, M) > 1. If… Read More »

Given an array arr[] of N positive integers, the task is to find the minimum LCM and GCD between elements of all possible sub-array. Examples:… Read More »

Given two positive integers X and Y, the task is to count the total numbers in range 1 to N which are divisible by X… Read More »