Category Archives: Mathematical

Count all perfect divisors of a number

Given a number n, count total perfect divisors of n. Perfect divisors are those divisors which are square of some integer. For example a perfect divisor of 8 is 4. Input : n = 16 Output : 3 Explanation : There are only 5 divisor of 16: 1, 2, 4, 8, 16. Only three of… Read More »

Seeds of a number

A Seed of a number n is a number x such that multiplication of x with its digits is equal to n. The task is to find all seeds of a given number n. If no seed exists, then print the same. Examples: Input : n = 138 Output : 23 23 is a seed… Read More »