## Next greater number on the basis of precedence of digits

Given a number num containing n digits. The problem is to find the next greater number using the same set of digits in num on… Read More »

## Program to check Plus Perfect Number

Given a ‘n’ digit number x, check if it is a plus perfect number or not. A number is plus perfect number if it is… Read More »

## Total numbers with no repeated digits in a range

Given a range find total such numbers in the given range such that they have no repeated digits. For example: 12 has no repeated digit.… Read More »

## Counting numbers whose difference from reverse is a product of k

Given two number l and r. Count the total numbers between l and r which when subtracted from their respective reverse, the difference is a… Read More »

## Maximize a number considering permutations with values smaller than limit

Given two numbers N and M. Construct maximal number by permuting (changing order) the digits of N, not exceeding M. Note : It is allowed… Read More »

## Number of decimal numbers of length k, that are strict monotone

We call decimal number a monotone if: Write a program which takes positive number n on input and returns number of decimal numbers of length… Read More »

## Counting numbers of n digits that are monotone

Call decimal number a monotone if: . Write a program which takes positive number n on input and returns number of decimal numbers of length… Read More »

## Self Descriptive Number

A self-descriptive number is an integer n in given base b is b digits long in which each digit at position p (the most significant… Read More »

## Find last k digits in product of an array numbers

Given a array size of n, find the last k digits (1 <= k < 10) of product of array numbers Examples: Input : a[]… Read More »

## Smallest number with sum of digits as N and divisible by 10^N

Find the smallest number such that the sum of its digits is N and it is divisible by . Examples : Input : N =… Read More »

## Münchhausen Number

Given a number N, output all Munchhausen numbers from 1 to n. Introduction : A Münchhausen number is a number equal to the sum of… Read More »

## K-th digit in ‘a’ raised to power ‘b’

Given three numbers a, b and k, find k-th digit in ab from right side Examples: Input : a = 3, b = 3, k… Read More »

## Recursive sum of digit in n^x, where n and x are very large

Given very large numbers n and x, we need to find the sum of digits of n^x such that : If n^x < 10 digSum(n^x)… Read More »

## Check if all digits of a number divide it

Given a number n, find whether all digits of n divide it or not. Examples: Input : 128 Output : Yes 128 % 1 ==… Read More »

## Count numbers in range L-R that are divisible by all of its non-zero digits

Given a range l – r (inclusive), count the numbers that are divisible by all of its non-zero digits. Examples: Input : 1 9 Output… Read More »