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

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 »

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 »

Given a number n, find the number of ways to multiply n elements with an associative operation. Examples : Input : 2 Output : 2… Read More »

Given a number n, generate a list of n composite numbers. Input : 5 Output : 122, 123, 124, 125 Input : 10 Output :… Read More »

Given a positive integer n, find the first digit in its factorial. Examples: Input : n = 5 Output : 1 Factorial of 5 is… Read More »

Given two numbers N and M. Find the number of ways in which factorial N can be expressed as a sum of two or more… Read More »

Given an integer n, find the power of a given prime number(r) in n! Examples : Input : n = 6 r = 3 Factorial… Read More »

Given a range [L, R], and a prime number P. We are required to find the sum of the highest power of P in all… Read More »

Given a string, count how many maximum-length palindromes are present.(It need not be a substring) Examples: Input : str = “ababa” Output: 2 Explanation :… Read More »

Given a string s that may have duplicate characters. Find out the lexicographic rank of s. s may consist lower as well as upper case… Read More »

Given two numbers, fact and n, find the largest power of n that divides fact! (Factorial of fact). Examples: Input : fact = 5, n… Read More »

Given two integer N or M find the number of zero’s trailing in product of factorials (N!*M!)? Examples: Input : N = 4, M =… Read More »

Given the upper limit limit, print factorials of all Fibonacci Numbers smaller than limit. Examples : Input : limit = 20 Output : 1 1… Read More »

This is a mathematical series program where a user must enter the number of terms up to which the sum of the series is to… Read More »

Given an integer n, we need to find the number of positive integers whose factorial ends with n zeros. Examples: Input : n = 1… Read More »