## Power of a prime number ‘r’ in n!

Given an integer n, find the power of a given prime number(r) in n! Examples : Input : n = 6 r = 3 Factorial… Read More »

- Range and Update Sum Queries with Factorial
- Number of ways to go from one point to another in a grid
- Program to calculate the value of nPr
- Number of trailing zeroes in base 16 representation of N!
- Find GCD of factorial of elements of given array
- Number of trailing zeroes in base B representation of N!
- Check if factorial of N is divisible by the sum of squares of first N natural numbers
- Check whether factorial of N is divisible by sum of first N natural numbers
- Number of ways to arrange K different objects taking N objects at a time
- Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B
- Maximum number with same digit factorial product
- Find the smallest number X such that X! contains at least Y trailing zeros.
- Check if a given number divides the sum of the factorials of its digits
- Count numbers having N 0's and and M 1's with no leading zeros
- Count different numbers possible using all the digits their frequency times
- Find sum of factorials in an array
- Check if N is a Factorial Prime

Given an integer n, find the power of a given prime number(r) in n! Examples : Input : n = 6 r = 3 Factorial… Read More »

Given a range [L, R], and a prime number P. We are required to find the sum of the highest power of P in all… Read More »

Given a string, count how many maximum-length palindromes are present.(It need not be a substring) Examples: Input : str = “ababa” Output: 2 Explanation :… Read More »

Given a string s that may have duplicate characters. Find out the lexicographic rank of s. s may consist lower as well as upper case… Read More »

Given two numbers, fact and n, find the largest power of n that divides fact! (Factorial of fact). Examples: Input : fact = 5, n… Read More »

Given two integer N or M find the number of zero’s trailing in product of factorials (N!*M!)? Examples: Input : N = 4, M =… Read More »

Given the upper limit limit, print factorials of all Fibonacci Numbers smaller than limit. Examples : Input : limit = 20 Output : 1 1… Read More »

This is a mathematical series program where a user must enter the number of terms up to which the sum of the series is to… Read More »

Given an integer n, we need to find the number of positive integers whose factorial ends with n zeros. Examples: Input : n = 1… Read More »

Given two number m and n, the task is to find factorial of all number including m and n and then print below format. Examples:… Read More »

Given two numbers m and n. Find the GCD of the their factorial. Examples : Input : n = 3, m = 4 Output :… Read More »

A number is said to be a Peterson number if the sum of factorials of each digit of the number is equal to the number… Read More »

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

Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. Example : Factorial of 6 is 6 * 5… Read More »

A number N is called a factorial number if it is the factorial of a positive integer. For example, the first few factorial numbers are… Read More »