## Maximum GCD from Given Product of Unknowns

Given two integers N and P where P is the product of N unknown integers, the task is to find the GCD of those integers.… Read More »

## Count number of trailing zeros in (1^1)*(2^2)*(3^3)*(4^4)*..

Given an integer n, the task is to find the number of trailing zeros in the function i.e. f(n) = 11 * 22 * 33… Read More »

## Largest subset where absolute difference of any two element is a power of 2

Given an array arr[] of distinct elements -109 ≤ ai ≤ 109. The task is to find the largest sub-set from the given array such… Read More »

## Ways to paint N paintings such that adjacent paintings don’t have same colors

Given two integers n and m, where n represent some paintings numbered from 1 to n and m represent some colours 1 to m with… Read More »

## Print all integers that are sum of powers of two given numbers

Given three non-negative integers x, y and bound, the task is to print all the powerful integer ≤ bound in sorted order. A powerful integer… Read More »

## Minimum removals in a number to be divisible by 10 power raised to K

Given two positive integers N and K. Find the minimum number of digits that can be removed from the number N such that after removals… Read More »

## Power in Mathematics

The power of a number says how many times to use the number in a multiplication. Powers are also called Exponents or Indices. For example,… Read More »

## Larger of a^b or b^a (a raised to power b or b raised to power a)

Given two numbers , find which is greater . If , print a^b is greater If , print b^a is greater If , print Both… Read More »

## Find the multiple of x which is closest to a^b

Given three integers a, b and x, the task is to get the multiple of x which is closest to ab. Examples: Input: a =… Read More »

## Total number of subsets in which the product of the elements is even

Given an array arr[] of integer elements, the task is to find the total number of sub-sets of arr[] in which product of the elements… Read More »

## Sum of first N natural numbers which are not powers of K

Given two integers and , the task is to find the sum of all the numbers within the range [1, n] excluding the numbers which… Read More »

## GCD of a number raised to some power and another number

Given three numbers a, b, n. Find GCD(an, b). Examples: Input : a = 2, b = 3, n = 3 Output : 1 2^3… Read More »

## Largest N digit number divisible by given three numbers

Given four integers x, y, z and n, the task is to find the largest n digit number which is divisible by x, y and… Read More »

## Find maximum value of x such that n! % (k^x) = 0

Given two integers and . The task is to find the maximum value of x, such that, n! % (k^x) = 0. Examples: Input :… Read More »

## Check if any permutation of N equals any power of K

Given a positive integer N and K where and . The task is to check whether any permutation of digits of N equals any power… Read More »