## Number of squares of maximum area in a rectangle

Given a rectangle of sides m and n. Cut the rectangle into smaller identical pieces such that each piece is a square having maximum possible… 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 a rectangle of sides m and n. Cut the rectangle into smaller identical pieces such that each piece is a square having maximum possible… Read More »

Finding LCM using GCD is explained here but here the task is to find LCM without first calculating GCD. Examples: Input: 7, 5 Output: 35… Read More »

Consider two cars A and B, running infinitely (either clockwise or anti-clockwise) on a circular road. Given the speed of both the cars a and… Read More »

Given two large numbers ‘a’ and ‘b’ such that(10^20<=a, b<=10^300). Find the LCM of two large numbers given. Examples: Input: a = 234516789234023485693020129 b =… Read More »

Given two positive integer a and b and a range [low, high]. The task is to find the gretest common divisor of a and b… Read More »

We are given an array of positive integers and an integer k. Find the maximum possible GCD of a sub sequence of size k. Examples:… Read More »

Given an array of positive elements and a positive integer k, the task is to convert the GCD of the array to 1. To make… Read More »

A Levelwise GCD/LCM alternating segment tree is a segment tree, such that at every level the operations GCD and LCM alternate. In other words at… Read More »

Given an array a[] of n elements. The task is to find the array (say b[]) of n + 1 such that Greatest Common Divisor… Read More »

Given an array and k, we need to find the minimum operations needed to make GCD of the array equal or multiple of k. Here… Read More »

Given a set of N elements such that N, task is to generate an array such that the GCD of any subset of the generated… Read More »

Given N and M, task is to find whether numbers 1 to N can be divided into two sets such that the absolute difference between… Read More »

Given L and R, find a possible non transitive triplet (a, b, c) such that pair (a, b) is coprime and pair (b, c) is… Read More »

Given a number, we need to find LCM of the factorial of the numbers and its neighbors. If the number is N, we need to… Read More »

Given two positive integer N, M. The task is to check if N and M are friendly pair or not. In number theory, friendly pairs… Read More »