# Tag Archives: factorial

## Implementation of Wilson Primality test

Given a number N, the task is to check if it is prime or not using Wilson Primality Test. Print ‘1’ isf the number is… Read More »

## Find the total Number of Digits in (N!)N

Given a number N. The task is to find the total Number of Digits in . Examples: Input: N = 3 Output: 3 If N=3,… Read More »

## Find sum of product of number in given series

Given two numbers N and T where, and . The task is to find the value of . Since sum can be large, output it… Read More »

## Minimum length of string having all permutation of given string.

Given a string where, . Assume that all the characters in are unique. The task is to compute the minimum length of a string which… Read More »

## Number of integral solutions of the equation x1 + x2 +…. + xN = k

Given N and K. The task is to count the number of the integral solutions of a linear equation having N variable as given below:… Read More »

## Find Nth term of the series 1, 1, 2, 6, 24…

Given a number N. The task is to write a program to find the Nth term in the below series: 1, 1, 2, 6, 24…… Read More »

## Find Nth term of the series 1, 8, 54, 384…

Given a number N. The task is to write a program to find the Nth term in the below series: 1, 8, 54, 384… Examples:… Read More »

## Find Nth term of series 1, 4, 15, 72, 420…

Given a number N. The task is to write a program to find the Nth term in the below series: 1, 4, 15, 72, 420…… Read More »

## Hyperfactorial of a number

Given a number, the task is to find the hyperfactorial of a number. The result of multiplying a given number of consecutive integers from 1… Read More »

## Queries of nCr%p in O(1) time complexity

Given Q queries and P where P is a prime number, each query has two numbers N and R and the task is to calculate… Read More »

## Number of digits in N factorial to the power N

Given a positive integer N, we have to find the total number of digits in the factorial of N raised to the power N, i.e,… Read More »

## 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 »

## Sum of series 1*1*2! + 2*2*3! + ……..+ n*n*(n+1)!

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 »

## Count numbers formed by given two digit with sum having given digits

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 »

## Program to calculate value of nCr

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 »