Swapping bits quickly

Started by
11 comments, last by d000hg 20 years, 8 months ago
**** Spoiler ****

(am I begin cautious enough?)
Turn one switch on, let it be like that for 10 minutes. Then turn it off and turn some other switch on. Then go to room. The one that''s shining is the one that you just switched on. The one that''s hot is the one you held on for 10 minutes. Thus you only need to go there once.
Advertisement
#include <iostream>int main(int argc, char* argv[]) {	unsigned char original = 0x0F;	unsigned char inverted = 0xF0;	std::cout<<((inverted == 255 - original)?"true":"false")<<std::endl;	return 0;}


truePress any key to continue 


"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Yeah sorry I think that should have been to reverse the order. My bad.
The light question is indeed as said - leave one on then turn it off, turn a second on and go to the room. The hot one you just turned off, the one on is the one you just turned on & the last one is obviously the 3rd one!

I failed on this by trying to do it through logic not lateral thinking btw! Who else got it?

This topic is closed to new replies.

Advertisement