# Tag Archives: number-theory

Given two positive integers N and K. The task is to find the Kth number that can be written as the sum of different non-negative… Read More
Number System is a method of representing numbers on the number line with the help of a set of symbols and rules. These symbols range… Read More
Given a positive integer N, the task is to generate N random hexadecimal integers. Examples:Attention reader! Don’t stop learning now. Get hold of all the… Read More
Given two integers N and K, the task is to find the number of different arrays of size N that can be formed having the… Read More
Given two Geometric Progressions (a1, r1) and (a2, r2) where (x, y) represents GP with initial term x  and common ratio y and an integer… Read More
Given three integers A, B, and C, the task is to find the minimum possible value of |A – X| + |B – Y| +… Read More
Given an array arr[] consisting of N integers and a positive integer X, the task is to count subsequences with GCD exactly X. Examples:Attention reader!… Read More
Given an integer array arr[] of N integers, the task is to make each adjacent pair in the array co prime, by adding minimum number of… Read More
Given two large integers in form of strings A and B and their product also in form of string C such that one digit of… Read More
Given three positive integers K, X, and Y, the task is to find the number formed by alternatively subtracting X and adding Y to 0… Read More
Given two integers L and R, the task is to find the count of numbers in range [L, R] such that the sum of digits… Read More
Given two integers N and K,  the task is to find the Kth lexicographical ordered string of length N, which has distinct products of each… Read More
Given an array arr[] of N integers, the task is to find the number of unordered pairs (i, j) in the array such that the… Read More
Given an integer N, find a prime number S such that all digits of N occur in a contiguous sequence. There may be multiple answers.… Read More
Given an integer X, D and T, the task is to check if it is possible to reduce X to 0 in exactly T moves.… Read More