## Maximize profit when divisibility by two numbers have associated profits

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 »

- 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
- Program to calculate the value of nCr Efficiently
- 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
- Minimum sum of the elements of an array after subtracting smaller elements from larger
- Program to find LCM of two Fibonnaci Numbers
- Sum of LCM(1, n), LCM(2, n), LCM(3, n), ... , LCM(n, n)
- Sum of common divisors of two numbers A and B
- Find an integer X which is divisor of all except exactly one element in an array
- Count of common multiples of two numbers in a range
- Count numbers in a range that are divisible by all array elements
- LCM of N numbers modulo M
- Number of Co-prime pairs from 1 to N with product equals to N
- Smallest integer > 1 which divides every element of the given array
- Maximum GCD of N integers with given product
- Count numbers in a range having GCD of powers of prime factors equal to 1
- Largest N digit number divisible by given three numbers
- 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
- Find GCD of factorial of elements of given array
- Minimum removals from array to make GCD greater
- Maximum length subarray with LCM equal to product
- GCD of a number raised to some power and another number
- Find the GCD of N Fibonacci Numbers with given Indices
- Minimum value that divides one number and divisible by other

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 »

Given a number N, the task is to find a positive number M such that gcd(N^M, N&M) is the maximum possible and M < N.… Read More »

Given an array arr[] of positive distinct integers, two players A and B are playing a game. At each move, a player selects two numbers… Read More »

Given two integers n and g, the task is to generate an increasing sequence of n integers such that: The gcd of all the elements… Read More »

Given two integers N and P where P is the product of N unknown integers, the task is to find the GCD of those integers.… Read More »

Given here are two positive numbers a and b. The task is to print the least common multiple of a’th and b’th Fibonacci Numbers. The… Read More »

Given an array arr[] of size N. The task is to find whether it is possible to make Binary Search Tree with the given array… Read More »

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 »