## Count number of sub-sequences with GCD 1

Given an array of N numbers, the task is to count the number of subsequences which have gcd equal to 1. Examples: Input: a[] =… Read More »

- Reach the numbers by making jumps of two given lengths
- Number of array elements derivable from D after performing certain operations
- Find three integers less than or equal to N such that their LCM is maximum
- Smallest perfect square divisible by all elements of an array
- Program to calculate the value of nCr Efficiently
- Minimum sum of the elements of an array after subtracting smaller elements from larger
- Find an integer X which is divisor of all except exactly one element in an array
- Program to find Nth term divisible by a or b
- Sum of LCM(1, n), LCM(2, n), LCM(3, n), ... , LCM(n, n)
- Sum of common divisors of two numbers A and B
- Maximum GCD of N integers with given product
- Count numbers in a range that are divisible by all array elements
- Number of Co-prime pairs from 1 to N with product equals to N
- LCM of N numbers modulo M
- Count numbers in a range having GCD of powers of prime factors equal to 1
- LCM and HCF of fractions
- Largest N digit number divisible by given three numbers
- Minimum value that divides one number and divisible by other
- Count common prime factors of two numbers
- Time taken by two persons to meet on a circular track
- Find the GCD of N Fibonacci Numbers with given Indices
- Maximum length subarray with LCM equal to product
- Minimum removals from array to make GCD greater
- Find any pair with given GCD and LCM
- GCD of a number raised to some power and another number
- Find two numbers whose sum and GCD are given
- Queries to count the number of unordered co-prime pairs from 1 to N
- Program to find HCF (Highest Common Factor) of 2 Numbers
- Divide the two given numbers by their common divisors
- Minimum cuts required to divide the Circle into equal parts

Given an array of N numbers, the task is to count the number of subsequences which have gcd equal to 1. Examples: Input: a[] =… Read More »

Given an arr[], the task is to find the maximum length of the sub-array such that LCM of the sub-array is equal to the product… Read More »

Given an array arr[], the task is to find the smallest perfect square which is divisible by all the elements of the given array. Examples:… Read More »

Given an array arr[], the task is to find the smallest perfect cube which is divisible by all the elements of the given array. Examples:… Read More »

Given two numbers A and B, the task is to Divide the two numbers A and B by their common divisors. The numbers A and… Read More »

Given two integer and , the task is to find the count of common factors of two numbers where factors are prime. Examples: Input: A… Read More »

Given N numbers and two numbers L and R., the task is to print the count of numbers in the range [L, R] which are… Read More »

Given an integer n, the task is to find the sum: LCM(1, n) + LCM(2, n) + LCM(3, n) + … + LCM(n, n) where… Read More »

Given integers k, d1, d2 and an integer array arr[]. Starting from number k you are allowed to make jumps of size d1 and d2… Read More »

Given an array of N integers and 3 integers D, A and B. The task is to find the number of array elements that we… Read More »

Given an array of integers. Find an integer X which is the divisor of all except for exactly one element in the given array. Note:… Read More »

Given N integers with unknown values (ai > 0) having product P. The task is to find the maximum possible greatest common divisor of these… Read More »

Given two integer p and q, the task is to find the minimum possible number x such that q % x = 0 and x… Read More »

Given an array arr[] of integers, the task is to find the LCM of all the elements of the array modulo M where M =… Read More »

Given a range represented by two positive integers L and R. The task is to count the numbers from the range having GCD of powers… Read More »