# Category Archives: Mathematical (adsbygoogle = window.adsbygoogle || []).push({});

## Prime factors of LCM of array elements

Given an array arr[] such that 1 <= arr[i] <= 10^12, the task is to find prime factors of LCM of array elements. Examples: Input… Read More »

## Remainder with 7 for large numbers

Given a large number as string, find remainder of number when divided by 7. Examples : Input : num = 1234 Output : 2 Input… Read More »

## GCD, LCM and Distributive Property

Given three integers x, y, z, the task is to compute the value of GCD(LCM(x,y), LCM(x,z)). Where, GCD = Greatest Common Divisor, LCM = Least… Read More »

## Disarium Number

Given a number “n”, find if it is Disarium or not. A number is called Disarium if sum of its digits powered with their respective… Read More »

## Check if a number can be expressed as a sum of consecutive numbers

Given a number n, the task is to check whether it can be expressed as a sum of two or more consecutive numbers or not.… Read More »

## Complete the sequence generated by a polynomial

Given a sequence with some of its term, we need to calculate next K term of this sequence. It is given that sequence is generated… Read More »

## Nearest prime less than given number n

You are given a number n ( 3 <= n < 10^6 ) and you have to find nearest prime less than n? Examples: Input… Read More »

## Smallest number divisible by first n numbers

Given a number n find the smallest number evenly divisible by each number 1 to n. Examples: Input : n = 4 Output : 12… Read More »

## Even Fibonacci Numbers Sum

Given a limit, find the sum of all the even-valued terms in the Fibonacci sequence below given limit. The first few terms of Fibonacci Numbers… Read More »

## Find numbers with K odd divisors in a given range

Given two numbers a and b, and a number k which is odd. The task is to find all the numbers between a and b… Read More »

## Nth Even Fibonacci Number

Given a value n, find the n’th even Fibonacci Number. Examples : Input : n = 3 Output : 34 Input : n = 4… Read More »

## Largest palindrome which is product of two n-digit numbers

Given a value n, find out the largest palindrome number which is product of two n digit numbers. Examples : Input : n = 2… Read More »

## Querying maximum number of divisors that a number in a given range has

Given Q queries, of type: L R, for each query you must print the maximum number of divisors that a number x (L <= x… Read More »

## Exactly n distinct prime factor numbers from a to b

You are given two numbers a and b (1 <= a,b <= 10^8 ) and n. The task is to find all numbers between a… Read More »

## N’th Smart Number

Given a number n, find n’th smart number (1<=n<=1000). Smart number is a number which has at least three distinct prime factors. We are given… Read More »