# Tag Archives: factorial

Given an integer N, the task is to find the subfactorial of the number represented as !N. The subfactorial of a number is defined using… Read More
Given two positive integers N and K, the task is to count the number of even and odd integers consisting of N bits, out of… Read More
Given three integers A, N and P, the task is to find (A^(N!)) % P. Examples:Attention reader! Don’t stop learning now. Get hold of all… Read More
Given a positive integer N, the task is to print the Exponential factorial of N. Since the output can be very large, print the answer… Read More
Given a positive number N, the task is to calculate the factorial of N without using the multiplication operator. Examples:Attention reader! Don’t stop learning now.… Read More
Given an array arr[] consisting of N positive integers, the task is to find the prefix factorials of a prefix sum array of the given… Read More
Given three positive integers N, R, and A and a polynomial P(X) of degree N, P(i) = 1 for 1 ≤ i ≤ N and… Read More
Given an integer N, the task is to count the number of prime factors of N!. Examples:Attention reader! Don’t stop learning now. Get hold of… Read More
Given an integer N, the task is to find the value of the expression ( N1 * (N – 1)2 * … * 1N) %… Read More
Given three positive integers, L, R, K and an array arr[] consisting of N positive integers, the task is to count the number of ways… Read More
Given an integer N, the task is to count the numbers less than or equal to N such that each number contains at least one… Read More
A factorial is positive integer n, and denoted by n!. Then the product of all positive integers less than or equal to n.  Attention geek!… Read More
Given N distinct objects, the task is to find the number of distinct arrangements of N objects if all clockwise arrangements are considered the same.… Read More
Given an integer N, the task is to count the total number of unimodal and non-unimodal permutations of integers [1, N] possible. An unimodal permutation… Read More
Given an array, arr[] of size N consisting of elements from the range [1, N], that represents the order, in which the elements are inserted… Read More