Tag Archives: factorial

The R programming language is used for statistical data analysis and machine learning, where the system is trained with a large dataset to analyze, organize… Read More
Given an array arr[] consisting of N positive integers, the task is to find the suffix factorials of a suffix sum array of the given… Read More
Given a positive integer N. The task is to compute the sum of factorial from 1! to N!, 1! + 2! + 3! + …… Read More
Given a large number N, the task is to find the factorial of N using recursion. Factorial of a non-negative integer is the multiplication of… Read More
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: Input: A = 2, N = 1, P =… 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: Input: N = 5Output:120Explanation:5*4*3*2*1=120 Input:… 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: Input: N = 5Output: 3Explanation: Factorial of 5… 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