##
Prime factors of a big number
November 19, 2017

Given a number N, print all the prime factors and their powers. Here N

November 19, 2017

Given a number N, print all the prime factors and their powers. Here N

November 5, 2017

Given an array arr[] of n positive integers. Represent every number as its factors (x * y = arr[i]) [Here x or y cannot be… Read More »

October 27, 2017

Given two numbers k and n, find the largest power of k that divides n! Constraints: K > 1 Examples: Input : n = 7,… Read More »

October 25, 2017

Given a positive integers ‘q’ and ‘n’. For each query ‘q’ find whether a number ‘n’ have exactly four distinct divisors or not. If the… Read More »

October 22, 2017

A number p greater than one is prime if and only if the only divisors of p are 1 and p. First few prime numbers… Read More »

October 18, 2017

Given two integers. We need to find if the first number x is divisible by all prime divisors of y. Examples: Input : x =… Read More »

October 16, 2017

Given a number n, write a program to calculate number of ways in which number can be expressed as product of two different factors. Examples:… Read More »

October 9, 2017

Given a positive integer n(1 <= n <= 1018). Check whether a number has exactly three distinct factors or not. Print “Yes” if it has… Read More »

October 2, 2017

Given a number n, find the product of all factors of n. Since the product can be very large answer it modulo 10^9 + 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 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 »

August 8, 2017

Given a number, find minimum sum of its factors. Examples: Input : 12 Output : 7 Explanation: Following are different ways to factorize 12 and… Read More »

July 17, 2017

Factor Tree is an intuitive method to understand factors of a number. It shows how all the factors are been derived from the number. It… 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 »