## Queries to count integers in a range [L, R] such that their digit sum is prime and divisible by K

Given Q queries and an integer K where each query consists of a range [L, R] and the task is to find the count of… Read More »

- Program to find the Nth Prime Number
- Generate elements of the array following given conditions
- Check if each element of the given array is the product of exactly K prime numbers
- Check if the given string is vowel prime
- Product of Primes of all Subsets
- Sum of numbers in a range [L, R] whose count of divisors is prime
- Sum of Semi-Prime Numbers less than or equal to N
- Program for Mobius Function | Set 2
- Queries for the difference between the count of composite and prime numbers in a given range
- Find the sum of prime numbers in the Kth array
- Find all numbers between range L to R such that sum of digit and sum of square of digit is prime
- Find the XOR of first N Prime Numbers
- Bitwise AND of the sum of prime numbers and the sum of composite numbers in an array
- Sum of prime numbers without odd prime digits
- Absolute difference between the XOR of Non-Prime numbers and Prime numbers of an Array
- Print characters having prime frequencies in order of occurrence
- GCD of elements which occur prime number of times
- Rearrange the given string such that all prime multiple indexes have same character
- Square free semiprimes in a given range using C++ STL
- Queries for the smallest and the largest prime number of given digit

Given Q queries and an integer K where each query consists of a range [L, R] and the task is to find the count of… Read More »

Given an integer D, the task is to find the sum of all the prime numbers whose count of digits is less than or equal… Read More »

Given two integers L and R, the task is to find the minimum difference between any two prime numbers in the range [L, R]. Examples:… Read More »

Given Q queries where each query consists of an integer range [L, R], the task is to find the sum of the integers from the… Read More »

Given K arrays where the first array contains the first prime number, the second array contains the next 2 primes and the third array contains… Read More »

Given an array arr[] of N elements, the task is to find the GCD of the elements which have prime frequencies in the array. Note… Read More »

Given an array arr[] of N positive integers, the task is to calculate the absolute difference between XOR of non-prime numbers and prime numbers. Note… Read More »

Given an array of positive numbers, the task is to find the bitwise AND of the sum of non-prime numbers and the sum of prime… Read More »

Given a string str containing only lowercase characters. The task is to print the characters having prime frequency in the order of their occurrence. Note… Read More »

Given a positive integer N, the task is to find the XOR of the first N prime numbers. Examples: Input: N = 3 Output: 4… Read More »

Given an integer N. The task is to find Mobius function of all numbers from 1 to N. Examples: Input: N = 5 Output: 1… Read More »

Given Q queries where every query consists of an integer D, the task is to find the smallest and the largest prime number with D… Read More »

Given a range L and R count all numbers between L to R such that sum of digit of each number and sum of square… Read More »

Given two integers L and R (L < = R). The task is to find all square free semiprimes in the range L to R… Read More »

Given an integer N. The task is to find the Nth prime number. Examples: Input : 5 Output : 11 Input : 16 Output :… Read More »