## Find the k-th smallest divisor of a natural number N

You’re given a number N and a number K. Our task is to find the kth smallest divisor of N. Examples: Input : N =… Read More »

## Find N digits number which is divisible by D

Given and . The task is to find a N digits number which is divisible by D ( 2 <= D <= 10). If it… Read More »

## Program to solve the Alligation Problem

Write a program to find the ratio in which a shopkeeper will mix two types of rice worth Rs. kg and Rs. kg, so that… Read More »

## Check if a number is Quartan Prime or not

Given a positive integer N, check if it is Quartan prime or not. Print ‘Yes’ if it is a Quartan prime otherwise Print ‘No’. Quartan… Read More »

## Check if a number has digits in the given Order

Given a number N. The task is to check if the digits of the number follow any of the below order: The digits are in… Read More »

## Check if a number is a Pythagorean Prime or not

Given a positive integer N, check if it is Pythagorean prime or not. If it is a Pythagorean prime, print ‘Yes’ otherwise print ‘No’. Pythagorean… Read More »

## Find minimum possible digit sum after adding a number d

Given a number n and a number d, we can add d to n as many times ( even 0 is possible ). The task… Read More »

## Ways to write N as sum of two or more positive integers | Set-2

Given a number N, the task is to find the number of ways N can be partitioned, i.e. the number of ways that N can… Read More »

## Check whether a given Number is Power-Isolated or not

Given a integer N, with prime factorisation n1p1 * n2p2 …… The task is to check if the integer N is power-isolated or not. An… Read More »

## Program to Add Two Complex Numbers

Given two complex numbers of the form and , the task is to add these two Complex Numbers. Here the values of real and imaginary… Read More »

## Divide a number into two parts such that sum of digits is maximum

Given a number N. The task is to find the maximum possible value of SumOfDigits(A) + SumOfDigits(B) such that A + B = n (0<=A,… Read More »

## Sum of Digits in a^n till a single digit

Given two numbers a and n, the task is to find the single sum of digits of a^n (pow(a, n)). In single digit sum, we… Read More »

## Check if a number can be expressed as a^b | Set 2

You have given a number n. Check if a number can be represented in the form of pow(a, b) (a^b). Examples: Input : 4 Output… Read More »

## Check if a large number can be divided into two or more segments of equal sum

Given a very large Number N. The task is to check if the number can be divided into two or more segments of an equal… Read More »

## Find four factors of N with maximum product and sum equal to N | Set-2

Given an integer . The task is to find all factors of N and print the product of four factors of N such that: Sum… Read More »