PROBLEM LINK:Author and Editorialist : Kamini Pandey DIFFICULTY:Adhoc , Easy PREREQUISITES:Sieve of Eratosthenes PROBLEM:To guess what is minimum number of questions that are needed to be asked to correctly guess any number in the given range. EXPLANATION:The idea is to get the number of primes factor for all the numbers up to K. Firstly lets compute number of primes <= K (This part can be pre computed using Sieve of Eratosthenes ). Then for every prime ‘p’ we need to find highest ‘v’ such that p^{v} <=K. we add ‘v’ to the answer for each prime. SOLUTION:
This question is marked "community wiki".
asked 16 Oct '15, 20:59

why Can't he ask in the manner of binary search on v(prime power) ? answered 28 Feb '17, 02:47
