Skip to content

Tag Archives: number-theory

Given an integer N, find a prime number S such that all digits of N occur in a contiguous sequence. There may be multiple answers.… Read More
Given an integer X, D and T, the task is to check if it is possible to reduce X to 0 in exactly T moves.… Read More
Given a range from L to R and an integer K, the task is to count the number of integers in the given range such… Read More
Given an array arr[] consisting of N positive integers and a positive integer X, the task is to find the subset of the given array… Read More
Given two positive integers N and K, the task is to find the number of pairs (a, b) over the range [1, N] such that… Read More
Given three positive integers A, B, and N, which represent a linear congruence of the form AX=B (mod N), the task is to print all… Read More
Given a range L to R, the task is to find the maximum possible value of GCD(X, Y) such that X and Y belongs to… Read More
Given an integer array A[] of size N, the task is to find the prime numbers just less and just greater than A[i] (for all… Read More
Given a positive even integer N, the task is to find the number of pairs (i, j) from the range [1, N] such that the… Read More
Given two arrays A[] and B[], both consisting of N positive integers, an integer P and the elements of the array A[] are pairwise co-prime, the… Read More
-Given two positive integers N and X, the task is to count the occurrences of the given integer X in an N-length square matrix generated… Read More
Given two positive integers N and X, the task is to count the occurrences of the given integer X in an N-length square matrix generated… Read More
Given a number N, the task is to count the minimum number of digits to be removed from N to make it divisible by 4.… Read More
Given an array arr[] of size N, the task is to find the number of non-empty subsets present in the array such that every element(… Read More
Given an array arr[] consisting of N integers, the task is to count the number of integers in the range [1, arr[i]] that does not… Read More

Start Your Coding Journey Now!