Skip to content

Tag Archives: divisors

Given two integers N and M, the task is to calculate the minimum number of moves to change N to M, where In one move… Read More
Given a positive integer N. In one operation subtract N with its highest divisor other than N and 1. The task is to find minimum… Read More
Given a positive integer N, the task is to find the number of triplets (A, B, C) where A, B, C are positive integers such… Read More
Given an array arr[] consisting of N distinct positive integers and a range [L, R], the task is to find the element in the given… Read More
Given a positive integer N, the task is to find the height of the Factor Tree of the given integer N. Examples: Input: N =… Read More
Given an array A[] with N integers, for each integer A[i] in the array, the task is to find the number of integers A[j] (j… Read More
Given a positive integer N, the task is to find the number of binary strings of length N that are repeated concatenation of only one… Read More
Given a positive integer N, the task is to find the Nth smallest number in the sequence which is having exactly 4 divisors. Examples: Input:… Read More
Given a number N, the task is to find the sum of all the prime factors of N.  Examples: Input: 10Output: 7Explanation: 2, 5 are… Read More
Given an array arr[] consisting of N integers, the task is to find the number of pairs, where i ≤ j, such that the sum… Read More
Given a positive integer N, the task is to print all the numbers, say K, such that K is a divisor of N and K… Read More
Given a positive integer N, the task is to find the minimum number of operations required to reduce N to 1 by repeatedly dividing N… Read More
Given an array arr[] consisting of N positive integers and an array Query[][2] consisting of Q queries of the form {L, R}, the task is… Read More
Given an array arr[] consisting of N positive integers, the task is to find the number of array elements whose count of divisors is a… Read More

Start Your Coding Journey Now!