Given a range from L to R and an integer K, the task is to count the number of integers…

# number-digits

### Count ways to make the number formed by K concatenations of a numeric string divisible by 5

Given a string S consisting of N digits and an integer K, the task is to count the number of…

### Count of different numbers divisible by 3 that can be obtained by changing at most one digit

Given a string str[] number N, the task is to calculate the number of ways to make the given number…

### Count N-digit numbers such that every position is divisible by the digit at that position

Given a positive integer N, the task is to count the number of N-digit numbers such that every index (1-based…

### Check if Decimal representation of given Binary String is divisible by K or not

Given a binary string S, the task is to find that the decimal representation of the given binary string is…

### Count of N-digit numbers having each digit as the mean of its adjacent digits

import java.util.*; class GFG{static int dp[][][] = new int[100][10][10];static int countOfNumbers(int digit, int prev1, int prev2, int n){ if (digit == n +…

### Maximum number formed from the digits of given three numbers

Maximum number formed from the digits of given three numbers Given 3 four-digit integers A, B, and C, the task…

### Count N-digit numbers that contains every possible digit atleast once

Count N-digit numbers that contains every possible digit atleast onceGiven a positive integer N, the task is to count the…

### Check if sum of digits in the left half is divisible by sum of digits in the right half in the largest permutation of N

Check if sum of digits in the left half is divisible by sum of digits in the right half in…

### Count N-digit numbers whose digits does not exceed absolute difference of the two previous digits

#include using namespace std; long long dp[50][10][10]; long long countOfNumbers(int digit, int prev1, int prev2, int N){ if (digit == N + 1) return 1; if…