Given an positive integer N, the task is to find the number of triplets (X, Y, Z) such that the sum of product of any… Read More

# Tag Archives: Prime Number

Given a string S consisting of N digits, the task is to find the number of distinct Prime Numbers that can be formed using the… Read More

Given a positive integer N, the task is to count the number of N-digit numbers whose sum of digits is a prime number. Examples: Input:… Read More

Given a positive integer N, the task is to generate a sequence say arr[] of maximum length having all elements at least 2 such that… Read More

Overview :An integer p>1 is called a prime number, or prime if the only positive divisors of p are 1 and p. An integer q>1… Read More

Given an array arr[] of size N, the task is to count the number of non-empty subsets whose product is equal to P1×P2×P3×……..×Pk where P1,… Read More

Given a positive integer N and a string S initially it is “A”, the task is to minimize the number of operations required to form… Read More

Given a positive integer N, the task is to find the Nth smallest number in the sequence which is having exactly 4 divisors. Examples: Input:… Read More

Given a number N, the task is to count the number of unique prime numbers that can be formed by deleting zero or more digits… Read More

Given two strings S1 and S2 consisting of N and M characters, the task is to check if the string S1 can be made equal… 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 an array arr[] consisting of N integers such that each array element arr[i] represent coefficients of a polynomial expression starting with the highest degree(A[0].X(N… Read More

Given two numbers X and Y, the task is to make both of them equal by repeatedly multiplying with their prime factors minimum number of… Read More

Given an integer N, repeatedly choose two distinct integers from the range 2 to N and if their GCD is found to be greater than… Read More

Given a Binary string, the task is to find the largest Prime Number possible by the decimal representation of a subsequence of the given binary… Read More