## Count all prime numbers in a given range whose sum of digits is also prime

Given two integers L and R, the task is to find the count of total numbers of prime numbers in the range [L, R] whose… Read More »

- Ternary number system or Base 3 numbers
- Find all divisors of first N natural numbers
- Find the largest composite number that divides N but is strictly lesser than N
- Check whether count of odd and even factors of a number are equal
- Split N natural numbers into two sets having GCD of their sums greater than 1
- Count of unique digits in a given number N
- Check if a number is Prime, Semi-Prime or Composite for very large numbers
- Split a number as sum of K numbers which are not divisible by K
- Transform N to Minimum possible value
- Sum of GCD of all numbers upto N with N itself
- Count of perfect squares of given length
- Program to Convert Octal to Hexadecimal
- Find two numbers whose difference of fourth power is equal to N
- Count of nodes having odd divisors in the given subtree for Q queries
- Largest number M less than N such that XOR of M and N is even
- Check if N can be expressed as product of 3 distinct numbers
- Sum of product of all subsets formed by only divisors of N
- Sum of Hamming difference of consecutive numbers from 0 to N | Set 2
- Determine whether the given integer N is a Peculiar Number or not
- Count of triplets in a given Array having GCD K
- Check if N can be obtained by repetitive addition or subtraction of two given numbers
- Check if all Prime factors of number N are unique or not
- Find K numbers with sum equal to N and sum of their squares maximized
- Sum of all divisors from 1 to N | Set 2
- Last digit in a power of 2
- Program to Convert BCD number into Decimal number
- Find pairs of elements from two different arrays whose product is a perfect square
- Find if it is possible to make all elements of an array equal by the given operations
- Count pairs in Array whose product is a Kth power of any positive integer
- Count of subsequences of length 4 in form (x, x, x+1, x+1) | Set 2

Given two integers L and R, the task is to find the count of total numbers of prime numbers in the range [L, R] whose… Read More »

Given a number N, the task is to find the minimum number of operations required to reduce the number N to zero by subtracting the… Read More »

Given a positive integer N, the task is to find the total number of distinct power of prime factor of the given number N. Examples:… Read More »

Given a large number in form of string str of size N, the task is to count the subsequence of length 4 whose digit are… Read More »

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

Given an integer array arr[] and an integer K, the task is to count all triplets whose GCD is equal to K.Examples: Input: arr[] =… Read More »

Given two integers X and Y representing total number of divisors and the number of composite divisors respectively, the task is to check if there… Read More »

Given an integer N, the task is to check whether N contains a digit D such that it is the average of all other digits… Read More »

Given a function f(K) = floor(N/K) (N>0 and K>0), the task is to find all possible values of f(K) for a given N where K… Read More »

Given an integer N, the task is to find two non-negative integers X and Y such that X4 – Y4 = N. If no such… Read More »

Given an integer N, the task is to find the sum of Greatest Common Divisors of all numbers up to N with N itself. Examples:… Read More »

Given a number n, we need to find the last digit of 2n Input : n = 4 Output : 6 The last digit in… Read More »

Given a binary tree and Q queries where each query contains a node of the binary tree, the task is to count the number of… Read More »

Given a BCD (Binary Coded Decimal) number, the task is to convert the BCD number into it’s equivalent Decimal number. Examples: Input: BCD = 100000101000… Read More »

Given two numbers N and K, the task is to split this number into K positive integers such that their sum is equal to N… Read More »