## Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B

Given three positive integers N, A and B. The task is to count the numbers of length N containing only digits A and B and… Read More »

- Program to calculate the value of nPr
- Number of ways to go from one point to another in a grid
- Number of trailing zeroes in base 16 representation of N!
- Find GCD of factorial of elements of given array
- Number of trailing zeroes in base B representation of N!
- Check if factorial of N is divisible by the sum of squares of first N natural numbers
- Check whether factorial of N is divisible by sum of first N natural numbers
- Number of ways to arrange K different objects taking N objects at a time
- Find the smallest number X such that X! contains at least Y trailing zeros.
- Factorial of an Array of integers
- Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B
- Find sum of factorials in an array
- Count numbers having N 0's and and M 1's with no leading zeros
- Check if a given number divides the sum of the factorials of its digits
- Check if N is a Factorial Prime
- Count different numbers possible using all the digits their frequency times
- Calculate MDAS Factorial of given number

Given three positive integers N, A and B. The task is to count the numbers of length N containing only digits A and B and… Read More »

Given a positive integer N, the task is to check if N is a Factorial prime or not. If it is a factorial prime then… Read More »

Given an array arr[] of N integers and number of queries Q. The task is to answer three types of queries. Update [l, r] –… Read More »

Given a string str which represents an integer, the task is to find the largest number without any leading or trailing zeros or ones whose… Read More »

Given a string ‘S’ containing vowels and consonants of lowercase English alphabets. The task is to find the number of ways in which the characters… Read More »

Given a word containing vowels and consonants. The task is to find that in how many different ways word can be arranged so that the… Read More »

Given two integers and . The task is to find the maximum value of x, such that, n! % (k^x) = 0. Examples: Input :… Read More »

Given a string ‘s’ and a character ‘c’, the task is to find the number of permutations of the string in which all the occurrences… Read More »

Given 2n girls and randomly divided into two subgroups each containing n girls. The task is to count the number of ways in which groups… Read More »

Given a word of length less than 10, the task is to find a number of ways in which it can be arranged without changing… Read More »

There are n boys and n girls are to be seated around a round table, in a circle. The task is to find number of… Read More »

Given a number N, the task is to find unit and tens places digit of the first N natural numbers factorials, i.e last last two… Read More »

Given a number N, the task is to find units place digit of the first N natural numbers factorials, i.e. 1!+2!+3!+….N! where N<=10e18. Examples: Input:… Read More »

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 »

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 »