# Tag Archives: factor

## Count of square free divisors of a given number

Given an integer N, the task is to count the number of square-free divisors of the given number. A number is said to be square-free,… Read More »

## Count of elements which is product of a pair or an element square

Given an array arr[] of N positive integers, the task is to count the number of array elements which can be expressed as the product… Read More »

## Count of Array elements to be divided by 2 to make at least K elements equal

Given an integer array arr[] of size N, the task is to find the minimum number of array elements required to be divided by 2,… Read More »

## Find pair with maximum GCD for integers in range 2 to N

Given a number N, the task is to find a pair of integers in the range [2, N] with maximum GCD. Examples: Input: N =… Read More »

## Count of elements on the left which are divisible by current element | Set 2

Given an array A[] of N integers, the task is to generate an array B[] such that B[i] contains the count of indices j in… Read More »

## Generate a unique Array of length N with sum of all subarrays divisible by N

Given an integer N, the task is to make an array of unique elements of length N such that all subarrays sum modulo N equals… Read More »

## Minimise N such that sum of count of all factors upto N is greater than or equal to X

Given a number X, the task is to find the minimum number N such that the sum of the count of all factors from 1… Read More »

## Greatest odd factor of an even number

Given an even number N, the task is to find the greatest possible odd factor of N. Examples: Input: N = 8642 Output: 4321 Explanation:… Read More »

## Count of pairs of integers whose difference of squares is equal to N

Given a positive integer N, the task is to find the count of pairs of integers (x, y) whose difference of squares is equal to… Read More »

## Parity of the given mathematical expression using given N numbers

Given N positive integers A1, A2, …, AN, the task is to determine the parity of the expression S. For the given N numbers, the… Read More »

## Find two numbers such that difference of their squares equal to N

Given an integer N, the task is to find two non-negative integers A and B, such that A2 – B2 = N. If no such… Read More »

## Panarithmic numbers within a given range

Given two positive numbers A and B.The task is to print all the Panarithmic Number between two numbers (inclusively). Panarithmic Numbers or Practical number is… Read More »

## Count of pairs (i, j) in the array such that arr[i] is a factor of arr[j]

Given an array of integers arr, the task is to calculate the number of pairs (i, j) where i < j such that arr[j] %… Read More »

## Sum of all perfect numbers present in an Linked list

Given an Linked list containing N positive integer, the task is to find the sum of all the perfect numbers from the list. A number… Read More »

## Find product of all elements at indexes which are factors of M for all possible sorted subsequences of length M

Given an array arr[] of N distinct integers and a positive integer M, the task is to find the product of all the elements at… Read More »