# Tag Archives: Numbers

## Find minimum possible values of A, B and C when two of the (A + B), (A + C) and (B + C) are given

Given two integers X and Y. X and Y represent any two values among (A + B), (A + C) and (B + C). The… Read More »

## Menu Driven Program to convert MKS to CGS and CGS to MKS

Prerequisite: Switch Case in C/C++ Problem Statement: Write a menu-driven program using the Switch case to convert the CGS system to MKS system and vice… Read More »

## Number of ways of distributing N identical objects in R distinct groups with no groups empty

Given two integer N and R, the task is to calculate the number of ways to distribute N identical objects into R distinct groups such… Read More »

## Number of ways of distributing N identical objects in R distinct groups

Given two integers N and R, the task is to calculate the number of ways to distribute N identical objects into R distinct groups. Examples:… Read More »

## Find sum of inverse of the divisors when sum of divisors and the number is given

Given an integer N and the sum of its divisors. The task is to find the sum of the inverse of the divisors of N.… Read More »

## Count numbers in given range such that sum of even digits is greater than sum of odd digits

Given two integers L and R denoting a range [L, R]. The task is to find the total count of numbers in the given range… Read More »

## Number of triplets such that each value is less than N and each pair sum is a multiple of K

Given two integers N and K. Find the numbers of triplets (a, b, c) such that 0 ≤ a, b, c ≤ N and (a… Read More »

## Probability of getting more heads than tails when N biased coins are tossed

Given an array p[] of odd length N where p[i] denotes the probability of getting a head on the ith coin. As the coins are… Read More »

## Check whether it is possible to convert A into B

Given two integers A and B. The task is to check whether it is possible to convert A into B by performing below operations any… Read More »

## Calculate MDAS Factorial of given number

Given an integer N, the task is to find the MDAS factorial. The general factorial of a no. N is given by : Factorial(N) =… Read More »

## Find the total number of composite factor for a given number

Given an integer N, the task is to find the total number of composite factors of N. Composite factors of a number are the factors… Read More »

## Multiply a number by 15 without using * and / operators

Given a integer N, the task is to multiply the number with 15 without using multiplication * and division / operators. Examples: Input: N =… Read More »

## Find the sum of numbers from 1 to n excluding those which are powers of K

Given two integer N and K, the task is to find the sum of all the numbers from the range [1, N] excluding those which… Read More »

## Maximum number of people that can be killed with strength P

There are infinite people standing in a row, indexed from 1. A person having index i has strength of i2. You have strength P and… Read More »

## Generate all unique partitions of an integer | Set 2

Given a positive integer n, the task is to generate all possible unique ways to represent n as sum of positive integers. Examples: Input: 4… Read More »