Tag Archives: factorial

Given three integers N, X and Y, the task is to check that if N! is divisible by XYExamples:   Input: N = 10, X =… Read More
Given an integer n and base B, the task is to find the length of n! in base B. Examples:  Input: n = 4, b =… Read More
Prerequisite: Print all prime factors and their powers Given natural numbers N and P, the task is to find the power of P in the factorization… Read More
Given a number N (<1010), the task is to find the minimum number of factorials needed to represent N, as their sum. Also, print those… Read More
Given an integer N, the task is to find the number of trailing zeros in the decimal notation of f(N) where f(N) = 1 if… Read More
Given a number n, the task is to determine whether n can be a factorial of some number xExamples:   Input: N = 24 Output: Yes… Read More
Given N students and a total of M sets of question paper where M ≤ N. All the M sets are different and every sets… Read More
Given an integer N, the task is to find the count of N-digit numbers with all distinct digits.Examples:   Input: N = 1 Output: 9 1, 2, 3,… Read More
Given a string str and two integers P and Q. The task is to find the total count of words that can be formed by… Read More
Given an integer N and the task is to check whether N is a Factorion or not. A Factorion is a number which is equal… Read More
Given Q[] queries where each query consists of an integer N, the task is to find the product of first N factorials for each of… Read More
Given a string str consisting of lowercase English alphabets, the task is to find the count of all possible string of maximum length that can… Read More
Given an array arr[] of integers, the task is to find the count of permutation of the array such that the permutation is in increasing… Read More
Euler Zigzag numbers is a sequence of integers which is a number of arrangements of those numbers so that each entry is alternately greater or… Read More
Given an integer N, the Task is to find the total number of N digit numbers possible such that:   All the digits of the numbers… Read More