Skip to content

Tag Archives: Prime Number

Given two integers N and K, the task is to check if N can be represented as a sum of K positive integers, where at… Read More
Given an integer N, the task is to count the number of ways in which N can be expressed as an exponent, i.e., xy, where… Read More
Given a matrix M[][] of dimension N*N, the task is to check if all the elements on the principal and cross diagonals of the matrix… Read More
Given an array arr[] of length N, with values less than N, the task is to construct another array A[] of same length such that… Read More
Given an integer N, the task is to count the number of distinct prime triplets (a, b, c) from the range [1, N] such that… Read More
Given an array arr[] of size N, the task is to find the count of distinct prime factors of each element of the given array.… Read More
Given an array arr[] consisting of N positive integers and an integer K, the task is to find the maximum sum of array elements in… Read More
Given an array arr[] consisting of N integers, the task is to find the integers whose digits are anagrams of each other and print the… Read More
Given an array arr[] of size N, the task is to find the maximum sum possible of the count of distinct prime factors of K… Read More
Given an integer N, the task is to find the number of distinct prime triplets from the range [1, N] having the sum of the… Read More
Given two integers L and R, the task is to calculate the count of numbers from the range [L, R] having exactly 5 distinct positive… Read More
Given an array arr[] consisting of N positive integers and integers L and R, the task is to find the count of numbers in the… Read More
Given an array Arr[] of N ( 1 ≤ N ≤ 105)integers, the task is to generate an array B[] consisting of N non-zero elements,… Read More
Given an array arr[] and an integer K, the task is to find the array element from indices not divisible by K whose product of… Read More