# Tag Archives: number-theory

Given an array arr[] of size N, the task is to count the number of pairs from the given array whose product contains only a… Read More
Given an integer N representing a non-linear equation of the form 2X + 5Y = N, the task is to find an integral pair (X,… Read More
Given two integers L, R, and an integer K, the task is to print all the pairs of Prime Numbers from the given range whose… Read More
Given two numbers A and B, the task is to find the minimum number that needs to be added to A and B such that… Read More
Given an integer N, the task is to reduce N to 1 by a minimum number of operations involving multiplication by 2 and division by… Read More
Given an array arr[], the task is to count the number of unordered pairs (arr[i], arr[j]) from the given array such that (arr[i] * arr[j])… Read More
Given a matrix mat[][] of dimensions N * M, the task is to print the maximum number of trailing zeros that can be obtained in the… Read More
Given an array arr[] of length N and a positive integer M, the task is to find the Bitwise XOR of all the array elements… Read More
Given a floating-point number in the form of a string N, the task is to convert the given floating-point number into fractions. Enclosed sequence of… Read More
Given a prime number N, the task is to find the closest smaller number than N such that modulo multiplicative inverse of a number under… Read More
Given an array arr[] of size N and a prime number P, the task is to count the elements of the array such that modulo… Read More
Given an array arr[] of size N, the task is to find the smallest subsequence of the given array whose GCD of the subsequence is… Read More
Given an array arr[] consisting of N integers, the task is to count the total number of pairs of array elements from the given array… Read More
Given an array arr[] of size N, the task is to count possible pairs of array elements (arr[i], arr[j]) such that (arr[i] + arr[j]) *… Read More
Given two integers A, B which are any two terms of an Arithmetic Progression series, and an integer N, the task is to minimize the… Read More