## Count of numbers whose sum of increasing powers of digits is equal to the number itself

Given an integer N, the task is to count all the integers less than or equal to N that follow the property where the sum… Read More »

## Maximum sum of two elements whose digit sum is equal

Given an array arr[] of N positive elements, the task is to find a pair in the array such that the digit sum of elements… Read More »

## Reduce the number to minimum multiple of 4 after removing the digits

Given an integer N, the task is to reduce the number to a smallest positive integer X after removing some of the digits (possibly none)… Read More »

## Minimize the sum of digits of A and B such that A + B = N

Given an integer N, the task is to find two positive integers A and B such that A + B = N and the sum… Read More »

## Check if B can be formed by permuting the binary digits of A

Given two integer A and B, the task is to check whether the binary representation of B can be generated by permuting the binary digits… Read More »

## Minimize the number by changing at most K digits

Given a number N, the task is to minimize the number by changing at most K digits. Note that the number should not contain any… Read More »

## Queries to count integers in a range [L, R] such that their digit sum is prime and divisible by K

Given Q queries and an integer K where each query consists of a range [L, R] and the task is to find the count of… Read More »

## Find the Nth digit in the proper fraction of two numbers

Given three integers P, Q and N where P < Q, the task is to compute the fraction value of P / Q and find… Read More »

## Program to find the last digit of X in base Y

Given a positive integer X and Y, the task is to find the last digit of X in the given base Y. Examples: Input: X… Read More »

## Find the number of positive integers less than or equal to N that have an odd number of digits

Given an integer N where 1 ≤ N ≤ 105, the task is to find the number of positive integers less than or equal to… Read More »

## Find the count of natural Hexadecimal numbers of size N

Given an integer N, the task is to find the count of natural Hexadecimal numbers with N digits. Examples: Input: N = 1 Output: 15… Read More »

## Largest Even and Odd N-digit numbers in Octal Number System

Given an integer N, the task is to find the largest even and odd N-digit numbers in Octal Number System. Examples: Input: N = 4… Read More »

## Count of matchsticks required to represent the given number

Given a large integer as a string str, the task is find the number of matchsticks required to represent it. Examples: Input: str = “56”… Read More »

## Minimum possible number with the given operation

Given a positive integer N, the task is to convert this integer to the minimum possible integer without leading zeroes by changing the digits. A… Read More »

## Reduce N to 1 with minimum number of given operations

Given an integer N, the task is to reduce N to 1 with the following two operations: 1 can be subtracted from each of the… Read More »