Skip to content

Tag Archives: LCM

Given an integer N, the task is to find the Landau’s Function of the number N. In number theory, The Landau’s function finds the largest… Read More
Given an integer X, the task is to find two integers A and B such that sum of these two numbers is X and the… Read More
Given an array arr[] of N positive integers. The task is to find the minimum LCM of all subarrays of size greater than 1. Examples: … Read More
Given an array A[] consisting of N positive integers, the task is to find the maximum possible value of:   F(M) = M % A[0] +… Read More
Given an array arr[], the task is to count the number of the unique arrays can be formed by updating the elements of the given… Read More
Given two prime numbers N and M, the task is to find the Least Common Multiple(LCM) of the two given prime numbers.Examples:   Input: N =… Read More
Given an array arr of size N containing numbers in the range [1, M], the task is to find an element, in the range [1,… Read More
Given an integer C, the task is to find the minimum possible value of max(A, B) such that LCM(A, B) = C.Examples:   Input: C =… Read More
Given an integer X, the task is to find two integers A and B such that LCM(A, B) = X and the difference between the… Read More
Given an array arr[] of length N ≥ 2. The task is to remove an element from the given array such that the LCM of… Read More
Given an array arr[] of length N, the task is to find the length of the longest sub-sequence with minimum possible LCM.Examples:   Input: arr[] =… Read More
Given a positive integer N > 1, the task is to find the maximum LCM among all the pairs (i, j) such that i <… Read More
Given an integer N, the task is to find the minimum possible integer X such that X % M = 1 for all M from… Read More
Given an array arr[] of N elements and a positive integer K. The task is to find the longest sub-sequence in the array having LCM… Read More
Given n, m, A and B. The task is to count the number of pairs of integers (x, y) such that 1 x n and 1 y m and… Read More

Start Your Coding Journey Now!