Given an integer N, the task is to find the count of all possible integers less than N satisfying the following properties: The number is… Read More

# Tag Archives: GCD-LCM

Given a Binary Tree, the task is to find the maximum value of GCD from any path from the root node to the leaf node.… Read More

Given two integer P and Q, the task is to find the value of P and modular inverse of Q modulo 998244353. That is … Read More

Given an integer N, the task is to find the maximum possible GCD of a pair of integers such that their sum is N. Examples… Read More

Given an integer N, the task is to find the maximum possible GCD among all pair of integers with product N.Examples: Input: N=12 Output: 2 Explanation: All possible… Read More

Given an integer N greater than 2, the task is to find an element M such that GCD(N, M) is maximum. Examples: Input: N =… Read More

Given an array arr[] which denotes the integer coefficients of the polynomial, the task is to find the content of the polynomial. Content of polynomials… Read More

Given a decimal number as N, the task is to convert N into an equivalent irreducible fraction. An irreducible fraction is a fraction in which… Read More

Given an integer N, the task is to print all proper fractions such that the denominator is less than or equal to N. Proper Fractions:… Read More

Given three integers a, b, and c representing a linear equation of the form: ax + by = c. The task is to find the… Read More

Given an array A[] of size N, the task is to maximize the count of distinct elements in the array by inserting the absolute differences… Read More

Given an array arr[] of positive integers, the task is to find the ratio of LCM and GCD of the given array.Examples: Input: arr[] =… Read More

Given a number N, the task is to find a pair of integers in the range [2, N] with maximum GCD.Examples: Input: N = 10 Output:… Read More

Given an integer array arr[] and an integer K, the task is to count all triplets whose GCD is equal to K.Examples: Input: arr[] =… Read More