## Check if is possible to get given sum from a given set of elements

Given array of numbers and a integer x. Find whether it is possible or not to get x by adding elements of given array, we… Read More »

## Sum of all prime divisors of all the numbers in range L-R

Given two integers L and R. The task is to find the sum of all prime factors of every number in the range[L-R]. Examples: Input:… Read More »

## Sum of all the prime divisors of a number

Given a number N. The task is to find the sum of all the prime divisors of N. Examples: Input: 60 Output: 10 2, 3,… Read More »

## Print the nearest prime number formed by adding prime numbers to N

Given a number N. The task is to print the nearest prime if the number is not prime by making it prime by adding prime… Read More »

## Check if the given number K is enough to reach the end of an array

Given an array arr[] of n elements and a number K. The task is to determine if it is possible to reach the end of… Read More »

## Prime numbers in a given range using STL | Set 2

Generate all prime numbers between two given numbers. The task is to print prime numbers in that range. The Sieve of Eratosthenes is one of… Read More »

## Compute power of power k times % m

Given x, k and m. Compute (xxxx…k)%m, x is in power k times. Given x is always prime and m is greater than x. Examples:… Read More »

## Number which has the maximum number of distinct prime factors in the range M to N

Given two numbers M and N. The task is to print the number which has the maximum number of distinct prime factors of numbers in… Read More »

## Number of distinct prime factors of first n natural numbers

Given a number N, find the number of distinct prime factors for all numbers in the range [1, N]. Examples : Input : N =… Read More »

## Minimum number of Square Free Divisors

Given an integer N. Find the minimum number of square free divisors. In other words, the factorization of N should comprise of only those divisors… Read More »

## Number of unmarked integers in a special sieve

Given an array A containing numbers from 2 to N.. A special type of sieving is done on it . The procedure of sieving is… Read More »

## Prime Number of Set Bits in Binary Representation | Set 1

Given two integers ‘L’ and ‘R’, write a program to find the total numbers that are having prime number of set bits in their binary… Read More »

## Queries on sum of odd number digit sums of all the factors of a number

Given Q queries. Each query contain a positive integer n. The task is to output the sum of sum of odd number digit contained in… Read More »

## Print prime numbers from 1 to N in reverse order

Given a number N, print all prime number smaller than or equal to N in reverse order . For example, if N is 9, the… Read More »

## Arithmetic Number

In number theory, an arithmetic number is an integer for which the average of its positive divisors is also an integer. Or in other words,… Read More »