![]() ![]() That is all the factors (numbers by which 48 is divisible) will be in pairs. So who would operate for example bulb 48: Whichever way you went, the important thing is what you notice about the bulbs that stayed on? If you haven't seen a pattern then write them down.įirst think who will operate each bulb, obviously person #2 will do all the even numbers, and say person #10 will operate all the bulbs that end in a zero. You can view the spreadsheet on google sheets here or if you want it to edit, grab the file lightbulb.xls (This is not the most optimised command, but it is the easiest to follow.) Eg: Person 5 is entitled to switch bulb 50 but notĥ1, do the sum if you like. ![]() If these are the same then the person is entitled Number divided the person number is an integer that is to say it does theĬalculation twice (bulb number / person number) and rounds off one of theĬalculations to the nearest integer. The 'if' command checks to see if the bulb I'll just briefly explain to you the function used: Note: no information is sent to me, the calculation is done entirely locally, on your computer. To that end I've written a simple simulator, and for even more detail below that there is a spread sheet, if you want the extra detail then un-hide it:. We'll use a more eloquent way of working this out, but first lets just brute force it. Before reading the answer can I interest you in a clue?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |