(Jan-16-2024, 08:44 AM)DPaul Wrote:(Jan-16-2024, 08:33 AM)Gribouillis Wrote: All of this needs to be clarified.I interpreted the problem as:
"...The fourth slave changed the state of every fourth door, and so on, up to the 100th ..."
The 5th every 5th door
The 6th every 6th door
....
The 100th every 100th door.
Or ?
Paul
Yeah, I came to the same conclusion.
My output is a little more "verbose":
Assuming that we don't use 'zero indexing', rather the first door is #1
Output:Door: 1 - open
Door: 4 - open
Door: 9 - open
Door: 16 - open
Door: 25 - open
Door: 36 - open
Door: 49 - open
Door: 64 - open
Door: 81 - open
Door: 100 - open
Sig:
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein