## Find count of digits in a number that divide the number

Given a positive integer n. The task is to find count of digits of number which evenly divides the number n. Examples: Input : n… Read More »

## Find the occurrences of digit d in the range [0..n]

Given a number n and a digit d, count all occurrences of d in range from 0 to n. Examples: Input : n = 25… Read More »

## Numbers having Unique (or Distinct) digits

Given a range, print all numbers having unique digits. Examples : Input : 10 20 Output : 10 12 13 14 15 16 17 18… Read More »

## Sum of all substrings of a string representing a number | Set 2 (Constant Extra Space)

Given a string representing a number, we need to get the sum of all possible sub strings of this string. Examples : Input : s… Read More »

## Automorphic Number

Given a number N, the task is to check whether the number is Automorphic number or not. A number is called Automorphic number if and… Read More »

## Find n-th element in a series with only 2 digits (4 and 7) allowed

Consider a series of numbers composed of only digits 4 and 7. First few numbers in the series are 4, 7, 44, 47, 74, 44744,..… Read More »

## Find the n-th number made of even digits only

Given a number n, find out the n-th positive number made up of even digits (0, 2, 4, 6, 8) only. Firs few numbers made… Read More »

## Given a number n, find the first k digits of n^n

Given a number n, find the first k digits of nn, where k is a value less than the number of digits in nn Examples… Read More »

## Generate k digit numbers with digits in strictly increasing order

Given a value k, generate all well ordered numbers of length k. Well ordered means that dig­its should be in increas­ing. Examples : Input :… Read More »

## Pandigital number in a given base

Given an integer n and its base b. The task is to check if given number is Pandigital Number in the given base or not.… Read More »

## Reverse digits of an integer with overflow handled

Write a program to reverse an integer assuming that the input is a 32-bit integer. If the reversed integer overflows, print -1 as the output.… Read More »

## Program to check Strong Number

Strong Numbers are the numbers whose sum of factorial of digits is equal to the original number. Given a number, check if it is a… Read More »

## Number of occurrences of 2 as a digit in numbers from 0 to n

Count the number of 2s as digit in all numbers from 0 to n. Examples : Input : 22 Output : 6 Explanation: Total 2s… Read More »

## Digital Root (repeated digital sum) of the given large integer

The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then… Read More »

## Tidy Number (Digits in non-decreasing Order)

Given a number, the task is to check if it is tidy or not. A tidy number is a number whose digits are in non-decreasing… Read More »