## Find the last digit when factorial of A divides factorial of B

We are given two numbers A and B such that B >= A. We need to compute the last digit of this resulting F such… 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
- Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B
- Find the smallest number X such that X! contains at least Y trailing zeros.
- Number of ways to arrange K different objects taking N objects at a time
- Maximum number with same digit factorial product
- 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

We are given two numbers A and B such that B >= A. We need to compute the last digit of this resulting F such… Read More »

You have been given a series 1/1! + 2/2! + 3/3! + 4/4! +…….+ n/n!, find out the sum of the series till nth term.… Read More »

This approach is based on Wilson’s theorem and using the fact that factorial computation can be done easily using DP Wilson theorem says if a… Read More »

Given a number ‘n’ and a prime number ‘p’. We need to find out the power of ‘p’ in prime factorization of n! Examples: Input… Read More »

We are aware of calculating factorials using loops or recursion, but if we are asked to calculate factorial without using any loop or recursion. Yes,… Read More »

A Krishnamurthy number is a number whose sum of the factorial of digits is equal to the number itself. For example 145, sum of factorial… Read More »

Given an integer n, we need to find a range of positive integers such that all the number in that range are composite and length… Read More »

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 »

Given a number n, write code to find the sum of digits in the factorial of the number. Given n <= 5000 Examples: Input :… Read More »

Given a number n, we need to calculate the sum of divisors of factorial of the number. Examples: Input : 4 Output : 60 Factorial… Read More »

Program to find maximum value of an integer for which factorial can be calculated on a machine, assuming that factorial is stored using basic data… Read More »

Strong Numbers are the numbers whose sum of factorial of digits is equal to the original number. Given a number, check if it is a… Read More »

Given three numbers n, r and p, compute value of nCr mod p. Here p is a prime number greater than n. Here nCr is… Read More »

Given two numbers n and k, print k-th prime factor among all prime factors of n. For example, if the input number is 15 and… Read More »

Double factorial of a non-negative integer n, is the product of all the integers from 1 to n that have the same parity (odd or… Read More »