Categories
Coding and Logic

Numbers Logic Challenge

I got awesome response to the previous MySQL Challenge. Awesome means, I got 6 responses, out of which 5 are correct (working) solutions and 2 are optimized solutions. You must be thinking, just 6 responses, but I am saying awesome. Yes, in my opinion quality is what matters, not quantity. I will explain the solution to that MySQL challenge in few more days. Before that, I am back with another small problem. This problem deals with numbers and simple mathematical calculations like addition.

Let me explain the situation first. And yes, this problem came into my mind, while I was working on some task. In fact I was testing something, and solved this problem while trying to get the exact issue.

So, there are 5 variables, say numbers. And a function adds all numbers one by one and returns you the result. But the function does not work all the times. You are not sure about which numbers is it missing. So you need to run this few times and note which number is it missing each time. You have one advantage. You can decide which number to assign to those 5 variables. So, you need to assign 5 unique numbers, so that you can know which numbers the function is missing, while calculating the sum, by just looking at the output.

Please email your solutions to contests [at] debiprasad.net. Write answers of three questions.

  1. What are the five numbers will you choose?
  2. How these five number will help you to find which numbers the function is missing to add?
  3. Why do you think the numbers you selected are the best among all other answers?

Also let me know about you, send me links to your twitter/blog/website.

Are you thinking what will be the prize for the best entries? I am not sure what to give as prize. Anyways depending upon the number of entries, I will try to feature most of you in this blog. So why are you waiting for…. send me your solution. Also, wait for my next post for the answers.

By Debiprasad

I am a software developer, Staying and working from my home town Cuttack, Orissa, India.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.