# Tag Archives: Numbers

## Min operations to reduce N to 1 by multiplying by A or dividing by B

Given a number N and two integers A and B, the task is to check if it is possible to convert the number to 1… Read More »

## Min operations to reduce N by multiplying by any number or taking square root

Given a number N, the task is to find the minimum value of N by applying below operations any number of times:  Multiply N by… Read More »

## How to store a very large number of more than 100 digits in C++

Given an integer N in form of string str consisting of more than 100 digits, the task is to store the value for performing an… Read More »

## Print all numbers in given range having digits in strictly increasing order

Given two postive integers L and R, the task is to print the numbers in the range [L, R] which have their digits in strictly… Read More »

## C/C++ program for Armstrong Numbers

Given a number N, the task is to check whether the given number is Armstrong number or not. If the given number is Armstrong Number… Read More »

## Find largest factor of N such that N/F is less than K

Given two numbers N and K, the task is to find the minimum value X such that N < X*K. Examples: Input: N = 8,… Read More »

## Find all numbers up to N which are both Pentagonal and Hexagonal

Given an integer N, the task is to find all numbers up to N, which are both Pentagonal as well as Hexagonal. Example: Input: N… Read More »

## Product of Complex Numbers using three Multiplication Operation

Given four integers a, b, c, and d which represents two complex numbers of the form (a + bi) and (c + di), the task… Read More »

## BCD or Binary Coded Decimal

Binary Coded Decimal, or BCD, is another process for converting decimal numbers into their binary equivalents. It is a form of binary encoding where each… Read More »

## Pentanacci Numbers

The Pentanacci series is a generalization of the Fibonacci sequence where each term is the sum of the five preceding terms. The first few Pentanacci… Read More »

## Form smallest number using indices of numbers chosen from Array with sum less than S

Given an array arr[] and an integer S, the task is to choose maximum count of numbers from the array such that sum of numbers… Read More »

## Compositorial of a number

Given a natural number N, the task is to find the Nth compositorial number. Compositorial of a number refers to the product of all the… Read More »

## Minimize steps to reach K from 0 by adding 1 or doubling at each step

Given a positive integer K, the task is to find the minimum number of operations of the following two types, required to change 0 to… Read More »

## Represent N as sum of K even or K odd numbers with repetitions allowed

Given two integer N and K, the task is to find an array of size K containing only even or odd elements where the sum… Read More »

## Check whether a given number N is a Nude Number or not

Given an integer N, the task is to check whether N is a Nude number or not. A Nude number is a number that is… Read More »