##
Sum of divisors of factorial of a number
June 7, 2017

Given a number n, we need to calculate the sum of divisors of factorial of the number. Examples: Input : 4 Output : 60 Factorial… Read More »

June 7, 2017

Given a number n, we need to calculate the sum of divisors of factorial of the number. Examples: Input : 4 Output : 60 Factorial… Read More »

In competitive programming or in general some problems seems difficult but can be solved very easily with little bit magic. We have discussed some tricks… Read More »

June 6, 2017

Given two numbers n and x, we need to calculate the smallest value of x that is closest to given number n. Examples: Input :… Read More »

Given a positive number n, we need to find all the combinations of 2*n elements such that every element from 1 to n appears exactly… Read More »

Given a set of m distinct positive integers and a value ‘N’. The problem is to count the total number of ways we can form… Read More »

June 5, 2017

Given a positive integer n, print the next smallest and the previous largest number that have the same number of 1 bits in their binary… Read More »

June 4, 2017

is_permutations() is used to check if two containers like string and vector are permutation of each other. It accepts three parameters, the first two parameters… Read More »

Given a circle of radius r and center in point(x1, y1) and given a point(x2, y2). The task is move center of circle from given… Read More »

Given a number N, the task is to check whether the number is Automorphic number or not. A number is called Automorphic number if and… Read More »

We know Fibonacci number, Fn = Fn-1 + Fn-2. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55,… Read More »

Given a number N, write a function to express N as sum of two or more consecutive positive numbers. If there is no solution, output… Read More »

Consider a series of numbers composed of only digits 4 and 7. First few numbers in the series are 4, 7, 44, 47, 74, 44744,..… Read More »

Given two integers m & n, find the number of possible sequences of length n such that each of the next element is greater than… Read More »

Given a positive number N. The task is to find maximum sum of distinct numbers such that the LCM of all these numbers is equal… Read More »

June 3, 2017

Given two given numbers a and b where 1 <= a <= b, find perfect cubes between a and b (a and b inclusive). Examples:… Read More »