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

- Program to find the last two digits of x^y
- Reduce number to a single digit by subtracting adjacent digits repeatedly
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Check if the sum of digits of number is divisible by all of its digits
- Round the given number to nearest multiple of 10 | Set-2
- First N terms whose sum of digits is a multiple of 10
- Find the maximum sum of digits of the product of two numbers
- Nearest greater number by interchanging the digits
- Find the smallest positive number which can not be represented by given digits
- Reduce N to 1 with minimum number of given operations
- Count the number of occurrences of a particular digit in a number
- Sum of the digits of square of the given number which has only 1's as its digits
- Find the first N integers such that the sum of their digits is equal to 10
- Sum of last digit of all integers from 1 to N divisible by M
- Find the remainder when First digit of a number is divided by its Last digit
- Minimum possible number with the given operation
- Check if two Integer are anagrams of each other
- Count of matchsticks required to represent the given number
- Find the largest number that can be formed by changing at most K digits

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 »

Given a string str representing a number and an integer K, the task is to find the largest number that can be formed by changing… Read More »

Given two integers A and B, the task is to check whether the given numbers are anagrams of each other or not. Just like strings,… Read More »

Given a number represented as a string str consisting of the digit 1 only i.e. 1, 11, 111, …. The task is to find the… Read More »

Given an integer N, the task is to check whether the sum of digits of the given number is divisible by all of its digits… Read More »

Given an integer N, the task is to print first N integers whose sum of digits is 10. Examples: Input: N = 4 Output: 19… Read More »

Given two integer N and N. The task is to compute the sum of last digit of all integer from 1 to N that is… Read More »

Given an integer N, the task is to print the first N terms whose sum of digits is a multiple of 10. First few terms… Read More »

Given a range [L, R], the task is to count the numbers which have even number of odd digits and odd number of even digits.… Read More »

Given a number N, the task is to reduce it to a single-digit number by repeatedly subtracting the adjacent digits. That is, in the first… Read More »

Given a number N, find the remainder when the first digit of N is divided by its last digit. Examples: Input: N = 1234 Output:… Read More »

Given a number N and a digit D, the task is to count the occurrences of D in N. Examples: Input: N = 25, D… Read More »

Given an array arr[] of size 10 where arr[i] represents the frequency of the digit i. The task is to find the smallest positive number… Read More »

Given an array arr[] of size N( > 2). The task is to find the maximum sum of digits of the product of any two… Read More »

The task is to find the last two digits of x^y. Since the digits with which it can end are 0-9, Hence this problem can… Read More »