Skip to content

Tag Archives: GCD-LCM

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
Given an array, write a program to find the maximum GCD among all the subarray of the size >= 2 of the given array. Examples:… 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

Start Your Coding Journey Now!