Skip to content

Tag Archives: Prime Number

Given a positive integer N, the task is to find the Nth Composite Number. Examples: Input: N = 1Output: 4 Input: N = 3 Output: 8… Read More
Given an array arr[] consisting of N positive integers, the task is to find the number of array elements whose count of divisors is a… Read More
Given a positive integer N, the task is to find the count of prime numbers less than or equal to N that can be represented… Read More
Given a positive integer N, the task is to find the smallest semi-prime number such that the difference between any of its two divisors is… Read More
Given a positive integer N, the task is to check if N can be represented as a sum of a Prime Number and a Perfect… Read More
Given an array arr[] of size N and an integer M, the task is to count the number of subarrays having product of its elements… Read More
Given an array arr[] size N, the task is to find the smallest number which is not co-prime with any element of the given array.… Read More
Given an integer N, the task is to count numbers from the range [1, N] which are the power of prime numbers. Examples: Input: N… Read More
Given an array arr[] consisting of N positive integers, the task is to find the minimum number of primes numbers required to be subtracted from… Read More
Given an array arr[] consisting of N positive integers, the task is to find an integer greater than 1 which is coprime with all the… Read More
Given an array arr[] of size N and a positive integer K, the task is to find the sum of all array elements which are… Read More
Given an array arr[] of size N, the task is to find the maximum difference between the sum of the prime numbers and the sum… Read More
Given an array Q[] consisting of N integers, the task for each element of the array Q[] is to check whether any of the numbers,… Read More