# Tag Archives: Numbers

## Hyperfactorial of a number

Given a number, the task is to find the hyperfactorial of a number. The result of multiplying a given number of consecutive integers from 1… Read More »

## Weird Number

In number theory, a weird number is a natural number that is abundant but not semiperfect. In other words, the sum of the proper divisors… Read More »

## Sum of elements in range L-R where first half and second half is filled with odd and even numbers

Given a number N, create an array such the first half of the array is filled with odd numbers till N and second half of… Read More »

## Element which occurs consecutively in a given subarray more than or equal to K times

Given an array of size N and Q queries, each query consists of L, R, and K(consider 1 based-indexing for L and R). The task… Read More »

## Minimum inverting factor in an array

Given an array of n positive integers, the task is to find the minimum inverting factor in the given array. Inverting factor is defined as… Read More »

## Number of ones in the smallest repunit

Given a positive integer N whose unit’s digit is 3. Find the number of 1s in the smallest repunit which is divisible by the given… Read More »

## Find the Number which contain the digit d

Given two integer number n and d. The task is to find the number between 0 to n which contain the specific digit d. Examples:… Read More »

## Fibbinary Numbers (No consecutive 1s in binary)

Given N, check if the number is Fibbinary Number or not. Fibbinary numbers are integers whose binary representation contains no consecutive ones. Examples : Input… Read More »

## Sum of square of first n odd numbers

Given a number n, find sum of square of first n odd natural numbers. Examples : Input : 3 Output : 35 12 + 32… Read More »

## Sum of square of first n even numbers

Given a number n, find sum of square of first n even natural numbers. Examples : Input : 3 Output : 56 22 + 42… Read More »

## Smallest number with sum of digits as N and divisible by 10^N

Find the smallest number such that the sum of its digits is N and it is divisible by . Examples : Input : N =… Read More »

## Difference between sum of the squares of first n natural numbers and square of sum

Given an integer n, find the absolute difference between sum of the squares of first n natural numbers and square of sum of first n… Read More »

## Octagonal number

You are given a number n, the task is to find nth octagonal number. Also, find the Octagonal series till n. An octagonal number is… Read More »

## Check whether the two numbers differ at one bit position only

Given two non-negative integers a and b. The problem is to check whether the two numbers differ at one bit position only or not. Examples:… Read More »

## Smallest n digit number divisible by given three numbers

Given x, y, z and n, find smallest n digit number which is divisible by x, y and z. Examples: Input : x = 2,… Read More »