Skip to content

# Tag Archives: divisibility

Given an array A[] of size N, and two numbers K and D, the task is to calculate the maximum subset-sum divisible by D possible… Read More
Given a number N, the task is to check if for every value of i (0 <= i <= len), the first i digits of… Read More
Given two positive integers M and N, the task is to calculate the smallest number that needs to be added to M, to make it… 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 two positive integers N and K, the task is to minimize the maximum element of the array formed such that the sum of array… Read More
Given an array arr[] consisting of N positive integers, the task is to find the maximum possible sum of the remaining array elements after repeatedly… Read More
Given a positive integer N, the task is to find the number of positive integers whose GCD with the given integer N is the number… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to find the sum of the array elements possible by… Read More
Given an array arr[] of size N and a positive integer K, the task is to find the sum of all array elements which are… Read More
Given an integer N, the task is to find three positive integers A, B, and C such that the value of the expression (3*A +… Read More
Given two strings S and T of length N and M respectively, the task is to find the smallest string that is divisible by both… Read More
-Given two positive integers N and X, the task is to count the occurrences of the given integer X in an N-length square matrix generated… Read More
Given an array arr[] consisting of N positive integers, the task for each array element arr[i] is to find all the digits from [0, 9]… Read More
Given a number N, the task is to count the minimum number of digits to be removed from N to make it divisible by 4.… Read More
Given an array arr[] of size N and a positive integer K, the task is to make every element of the array divisible by K… Read More