## Count ordered pairs with product less than N

Given an integer N. The task is to count the number of ordered pairs (a, b) such that . Examples: Input: N = 5 Output:… 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 an integer N. The task is to count the number of ordered pairs (a, b) such that . Examples: Input: N = 5 Output:… Read More »

Greatest Integer Function [X] indicates an integral part of the real number which is nearest and smaller integer to . It is also known as… Read More »

Given an integer ‘n’, the task is to check whether the sum of digits at the odd positions (from right to left) is prime or… Read More »

ElGamal encryption is an public-key cryptosystem. It uses asymmetric key encryption for communicating between two parties and encrypting the message. This cryptosystem is based on… Read More »

Given a positive integer N. The task is to check if N is an Achilles number or not. Print ‘YES’ if N is an Achilles… Read More »

Given two integers A and B. The task is to count how many numbers in the interval [ A, B ] have an odd number… Read More »

Given a positive integer N. The task is to check if N is an unusual number or not. Print ‘YES’ if M is an unusual… Read More »

Given two squares with side lengths and (a > b). The task is to check if difference of their areas is prime or not. Here… Read More »

Given a Hexadecimal number as an input, the task is to convert that number to Binary number. Examples: Input: Hexadecimal = 1AC5 Output: Binary =… Read More »

Given a positive Integer n, The task is to print Gould’s sequence up to nth term. In Mathematics, Gould’s sequence is an integer sequence whose… Read More »

Given a positive integer n, print every Prime Quadruplet below . Prime quadruplet: In mathematics, Prime Quadruplet is a set of four primes of the… Read More »

Given a positive number N, the task is to check if N is a primorial prime number or not. Print ‘YES’ if N is a… Read More »

Given a positive integer n, check if it is an Ore number or not. Print ‘YES’ if n is an ore number otherwise print ‘NO’.… Read More »

Given a positive integer . The task is to represent it as a sum of the maximum possible number of prime numbers. (N > 1)… Read More »

Given two positive integer n1 and n2, the task is to check if both are Cousin primes or not. Print ‘YES’ if the both the… Read More »