Given two natural numbers N and K where N >= 2, you have a list of available numbers as all numbers in inclusive range K to K+N-1. You can sum any two natural numbers in available list to create a new natural number, which is then added to list of available numbers. How many natural number exist which cannot be created by this method?
I can make that easily. My starting values are K=2 and N=7584750849753846743087565784367894.
That means my list is every number from 2 to 7584750849753846743087565784367894 + 2 - 1, which contains that first number.
Basically, there is no number you can name that I cannot get onto my list, because I just pick my starting values to be 2 and some number bigger than your number.
Or are you saying that you get a given a set, fixed N and K, and you have to identify all the numbers that cannot be added to the list for that particular N and K?
Oh, right. I assumed that it didn't matter which was n and which was k, so I just swapped them round. I thought this was a number theory question, but it seems it's another codechef.
I think thats a problem from an ongoing contest.....use a pen and a paper and write down answers for 2 or 3 examples you will see a pattern....give it time if u want to learn!!
@iotaa yes sure....i missed that....i mean to say just keep adding numbers already in the array...and after a while all the numbers will start appearing!!