Check whether a number is semiprime or not
Given a positive integer n. Find whether a number is a semiprime or not. Print True if number is semiprime else False. A semiprime is… Read More »
Given a positive integer n. Find whether a number is a semiprime or not. Print True if number is semiprime else False. A semiprime is… Read More »
Given a number n, the task is to find the sum of all the divisors. Examples : Input : n = 30 Output : 72… Read More »
Given a positive integer n and the task is to find the sum of series 1*2*3 + 2*3*4 + 4*5*6 + . . .+ n*(n+1)*(n+2).… Read More »
You have been given a series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + … + (n*n), find out the sum of the… Read More »
Given an integer n, we need to find the number of positive integers whose factorial ends with n zeros. Examples: Input : n = 1… Read More »
Given a number n, divide first n natural numbers (1, 2, …n) into two subsets such that difference between sums of two subsets is minimum.… Read More »
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 »
Given a positive integer n. The problem is to find the sum of the given series 1 + (1+2) + (1+2+3) + (1+2+3+4) + ……… Read More »
Given an integer n, the task is to find whether n can be written as sum of three consecutive integer. If yes, find the three… Read More »
Given a positive integer n. Find the value of where function F(i) for number i be defined as sum of all divisors of ‘i‘. Examples… Read More »
Given a positive integer ‘n'( 1 <= n <= 1015). Find the largest prime factor of a number. Input: 6 Output: 3 Explanation Prime factor… Read More »
According to Midy’s theorem, if the period of a repeating decimal for , where p is prime and is a reduced fraction, has an even… Read More »
In combinatorics, the Eulerian Number A(n, m), is the number of permutations of the numbers 1 to n in which exactly m elements are greater… Read More »
Given a positive integer N. The task is to find 12 + 22 + 32 + ….. + N2. Examples : Input : N =… Read More »
Given a number and to find first and last digit of a number. Examples: Input : 12345 Output : First digit: 1 last digit :… Read More »