The CodeChef.com Challenge - your monthly dose of coding puzzles from India's biggest coding contest, now in print!
Solve this month’s puzzle, and you stand the chance of being one of the three lucky people who could win a cash prize of Rs 1,000 each!
The October edition’s puzzle:
Here are the conditions of the magic number: 1. If the magic number was a multiple of 2, then it was a
number from 50 through 59. 2. If it was not a multiple of 3, then it was a number
from 60 through 69. 3. If the magic number was not a multiple of 4, then it was a number from 70 through 79. What was the magic number?
1. Condition 1 eliminates all multiples of 2 except those from 50 to 59. Therefore, the numbers eliminated are 60, 62, 64, 66, 68, 70, 72, 74, 76 and 78. 2. Condition 2 indicates that if the number was not a multiple of 3, it was a number from 60 through 69. This eliminates 50, 52, 53, 55, 56, 58, 59, 71, 73, 77 and 79. 3. Condition 3 indicates that if the number was not a multiple of 4, then it was a number from 70 through 79. This eliminates 51, 54, 57, 61, 63, 65, 67 and 69. 4. The remaining number, 75, satisfies all three conditions. • It is not a multiple of 2 and so it does not have to be a number from 50 through 59. It is a multiple of 3, and so it does not have to be a number from 60 through 69.
• • It is not a multiple of 4, and so it is, necessarily, a number from 70 through 79. Hence, the answer is 75.
And the winners this month are:
• Saba Chaudhary
• Wasim Mohammad
Here’s your CodeChef ‘Puzzle of the Month’:
Our chef is fond of collecting international and Indian postage stamps, and only he knows how many stamps he had. Once, when asked by one of his friends about the number of stamps he owned, he replied with the following sentence:
“If I divide the stamps into two sets, viz., international and Indian, then 5 times the difference between the number of stamps in each set equals half of the total number of stamps. Also, I’ve more number of Indian stamps compared to international ones. And half of the difference between the squares of the number of stamps in the Indian and international set is 1620.”
Can you help the friend to find out how many international and Indian stamps the chef has collected?
Looking for a little extra cash?
Solve this month’s CodeChef Challenge puzzle and send in your answer to [email protected]dia.com or [email protected] by November 15, 2012. Three lucky winners get to win some awesome prizes, both in cash and other merchandise! You can also participate in the contest by visiting the online space for the article at https:// www.facebook.com/ LinuxForYou.