## Count of all possible values of X such that A % X = B

Given two integers A and B. The task is to find the count of all possible values X such that A % X = B.… Read More »

- Count of all possible values of X such that A % X = B
- Length of the smallest number which is divisible by K and formed by using 1's only
- LCM of N numbers modulo M
- Find minimum x such that (x % k) * (x / k) == n
- Count of pairs of (i, j) such that ((n % i) % j) % n is maximized
- Find 2^(2^A) % B
- Find the value of XXXX.....(N times) % M where N is large
- Find N % 4 (Remainder with 4) for a large value of N
- Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B

Given two integers A and B. The task is to find the count of all possible values X such that A % X = B.… Read More »

Given an integer K, the task is to find the length of the smallest no. N which is divisible by K and formed by using… Read More »

Given two integers A and B, the task is to calculate 22A % B. Examples: Input: A = 3, B = 5 Output: 1 223… Read More »

Given three integers X, N and M. The task is to find XXX…(N times) % M where X can be any digitfrom the range [1,… Read More »

Given a string str representing a large integer, the task is to find the result of N % 4. Examples: Input: N = 81 Output:… Read More »

Given three positive integers N, A and B. The task is to count the numbers of length N containing only digits A and B and… Read More »

Given an integer n, the task is to count the number of pairs (i, j) such that ((n % i) % j) % n is… Read More »

Given two positive integers n and k. Find minimum positive integer x such that the (x % k) * (x / k) == n, where… Read More »

Given an array arr[] of integers, the task is to find the LCM of all the elements of the array modulo M where M =… Read More »

Given two integers A and B where A is not divisible by B, the task is to express A / B as a natural number… Read More »

Given a prime . The task is to count all the primitive roots of . A primitive root is an integer x (1 <= x… Read More »

Given an integer N which is the number of stones in a pile and the game of stones is being played between you and your… Read More »

Given an array of integers and a number K. The task is to sort only those elements of the array which yields remainder P upon… Read More »

Given three numbers a, b, n. Find GCD(an, b). Examples: Input : a = 2, b = 3, n = 3 Output : 1 2^3… Read More »

Given a number N, the task is to find the smallest number not less than N, which has all digits odd. Examples: Input: N =… Read More »