## Product of first N factorials

Given a number N. Find the product of first N factorials modulo 1000000007. Constraints: 1 ≤ N ≤ 1e6 Examples: Input : 3 Output :… Read More »

- Find the unit place digit of sum of N factorials
- Number of integral solutions of the equation x1 + x2 +.... + xN = k
- Range and Update Sum Queries with Factorial
- Number of permutations of a string in which all the occurrences of a given character occurs together
- Number of trailing zeroes in base 16 representation of N!
- Find maximum value of x such that n! % (k^x) = 0
- Find Nth term of the series 1, 1, 2, 6, 24...
- Find GCD of factorial of elements of given array
- Number of ways to arrange a word such that all vowels occur together
- Find last two digits of sum of N factorials
- Number of trailing zeroes in base B representation of N!
- Find Nth term of the series 1, 8, 54, 384...
- Program to calculate the value of nPr
- Find sum of product of number in given series
- Find the total Number of Digits in (N!)N
- Minimum length of string having all permutation of given string.
- Implementation of Wilson Primality test
- Arrangement of the characters of a word such that all vowels are at odd places
- Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B
- Seating arrangement of n boys and girls alternatively around a round table
- Maximum number with same digit factorial product
- Ways of dividing a group into two halves such that two elements are in different groups
- Arrangement of words without changing the relative position of vowel and consonants
- Count numbers having N 0's and and M 1's with no leading zeros
- Find the smallest number X such that X! contains at least Y trailing zeros.
- Check if N is a Factorial Prime

Given a number N. Find the product of first N factorials modulo 1000000007. Constraints: 1 ≤ N ≤ 1e6 Examples: Input : 3 Output :… Read More »

Given n, we need to find sum of 1*1*2! + 2*2*3! + ……..+ n*n*(n+1)! Examples: Input: 1 Output: 2 Input: 3 Output: 242 We may… Read More »

Given a, b and N(1 to 106). Task is to count the numbers formed by digits a and b exactly of a length N such… Read More »

Following are common definition of Binomial Coefficients. A binomial coefficient C(n, k) can be defined as the coefficient of X^k in the expansion of (1… Read More »

Given a number n, find the number of ways to multiply n elements with an associative operation. Examples : Input : 2 Output : 2… Read More »

Given a number n, generate a list of n composite numbers. Examples: Input : 5 Output : 122, 123, 124, 125 Input : 10 Output… Read More »

Given a positive integer n, find the first digit in its factorial. Examples : Input : n = 5 Output : 1 Factorial of 5… Read More »

Given two numbers N and M. Find the number of ways in which factorial N can be expressed as a sum of two or more… Read More »

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 »