## Ways to express a number as product of two different factors

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 »

## Check whether a number has exactly three distinct factors or not

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 »

## Product of factors of number

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 »

## Count divisors of array multiplication

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 »

## Total number of divisors for a given number

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

## Maximum number of unique prime factors

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 »

## Find minimum sum of factors of number

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 »

## Factor Tree of a given Number

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 »

## Sum of all proper divisors of natural numbers in an array

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 »

## Numbers with exactly 3 divisors

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

## Count of subarrays whose products don’t have any repeating prime factor

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 »

## Smallest number S such that N is a factor of S factorial or S!

Given a number N. You are tasked with finding the smallest number S, such that N is a factor of S! (S factorial). N can… Read More »

## Find if n can be written as product of k numbers

Given a positive number n, we need to print exactly k positive numbers (all greater than 1) such that product of those k numbers is… Read More »

## Check if the door is open or closed

Given n doors and n persons. The doors are numbered 1 to n and persons are given id’s numbered 1 to n. Each door can… Read More »

## Find politeness of a number

Given an integer n. Find politeness of number n. Politeness of a number is defined as the number of ways it can be expressed as… Read More »