##
Pair with maximum GCD from two arrays
October 22, 2017

Given two arrays of n integers with values of array being small (values never exceed a small number say 100). Find the pair(x, y) which… Read More »

October 22, 2017

Given two arrays of n integers with values of array being small (values never exceed a small number say 100). Find the pair(x, y) which… Read More »

October 20, 2017

A Pierpont Prime is a prime number of the form p = 2l.3k + 1. First few Pierpont prime numbers are 2, 3, 5, 7,… Read More »

September 30, 2017

Given an array with N elements, task is to find the count of factors of a number X which is product of all array elements.… Read More »

September 28, 2017

Given an array of integers. We are required to write a program to print the number of factors of every element of the given array.… Read More »

September 26, 2017

Given two integers ‘L’ and ‘R’, we need to write a program that finds the count of numbers having prime number of set bits in… Read More »

September 10, 2017

Given a positive integer n, we have to find the total number of divisors for n. Examples: Input : n = 25 Output : 3… Read More »

September 9, 2017

Given a number N, find the maximum number of unique prime factors any number can have in range [1, N]. Examples: Input : N =… Read More »

July 29, 2017

Write a C program to find sum of all prime numbers between 1 to n. Examples: Input : 10 Output : 17 Explanation : Primes… Read More »

July 11, 2017

Given an array of natural numbers count the sum of its proper divisors for every element in array. Input : int arr[] = {8, 13,… Read More »

July 6, 2017

Given a number N, print all numbers in range from 1 to N having exactly 3 divisors. Input : N = 16 Output : 4… Read More »

July 4, 2017

Given an array of integers. Find the total number of subarrays whose product of all elements doesn’t contain repeating prime factor in prime decomposition of… Read More »

June 26, 2017

Euler Totient Function (ETF) Φ(n) for an input n is count of numbers in {1, 2, 3, …, n} that are relatively prime to n,… Read More »

June 9, 2017

Given three integers a, b, n .Your task is to print number of numbers between a and b including them also which have n-divisors. A… Read More »

May 20, 2017

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 »

May 5, 2017

A Left-truncatable prime is a prime which in a given base (say 10) does not contain 0 and which remains prime when the leading (“left”)… Read More »