Skip to content

Tag Archives: Prime Number

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
A natural number (1, 2, 3, 4, 5 and so on) is called a prime number if it is greater than 1 and cannot be… Read More
Given three positive integers M, X, and Y, the task is to find the minimum number of operations required to make X and Y equal… Read More