## Prime factors of LCM of array elements

Given an array arr[] such that 1 <= arr[i] <= 10^12, the task is to find prime factors of LCM of array elements. Examples: Input… 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 Nth term divisible by a or b
- 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)
- Sum of common divisors of two numbers A and B
- Count of common multiples of two numbers in a range
- Find an integer X which is divisor of all except exactly one element in an array
- Count numbers in a range that are divisible by all array elements
- LCM of N numbers modulo M
- Count numbers in a range having GCD of powers of prime factors equal to 1
- Maximum GCD of N integers with given product
- LCM and HCF of fractions
- Time taken by two persons to meet on a circular track
- Count common prime factors of two numbers
- Count number of sub-sequences with GCD 1
- Largest N digit number divisible by given three numbers
- Maximum length subarray with LCM equal to product
- Find two numbers whose sum and GCD are given
- GCD of a number raised to some power and another number
- Minimum value that divides one number and divisible by other
- Find the winner by adding Pairwise difference of elements in the array until Possible
- Divide the two given numbers by their common divisors
- Minimum cuts required to divide the Circle into equal parts
- Check if there is any pair in a given range with GCD is divisible by k
- All possible co-prime distinct element pairs within a range [L, R]

Given an array arr[] such that 1 <= arr[i] <= 10^12, the task is to find prime factors of LCM of array elements. Examples: Input… Read More »

Given three integers x, y, z, the task is to compute the value of GCD(LCM(x,y), LCM(x,z)). Where, GCD = Greatest Common Divisor, LCM = Least… Read More »

Given a number n find the smallest number evenly divisible by each number 1 to n. Examples: Input : n = 4 Output : 12… Read More »

Given two integer numbers, the task is to find the count of all common divisors of given numbers? Input : a = 12, b =… Read More »

Given two integer numbers, the task is to find the count of all common divisors of given numbers. Input : a = 12, b =… Read More »

You are given two positive numbers M and N. The task is to print greatest common divisor of M’th and N’th Fibonacci Numbers. The first… Read More »

Stein’s algorithm or binary GCD algorithm is an algorithm that computes the greatest common divisor of two non-negative integers. Stein’s algorithm replaces division with arithmetic… Read More »

Given an array of n numbers, find LCM of it. Input : {1, 2, 8, 3} Output : 24 Input : {2, 7, 3, 9,… Read More »

Given an array arr[] of n numbers and an integer k, find length of the minimum sub-array with gcd equals to k. Example: Input: arr[]… Read More »

Euler’s Totient function ?(n) for an input n is count of numbers in {1, 2, 3, …, n} that are relatively prime to n, i.e.,… Read More »

GCD of two numbers is the largest number that divides both of them. A simple way to find GCD is to factorize both numbers and… Read More »

LCM (Least Common Multiple) of two numbers is the smallest number which can be divided by both numbers. For example LCM of 15 and 20… Read More »

GCD (Greatest Common Divisor) or HCF (Highest Common Factor) of two numbers is the largest number that divides both of them. For example GCD of… Read More »