PDA

View Full Version : Brain Teaser #5


kauai_diver
Jul4-03, 12:04 AM
I guess I dont have access to the brain teaser forum. This one kinda confused me:

Using “Only Four” ZEROS (0) and any Mathematical Operations/Symbols, to obtain the number 24.

Answer is (0! + 0! + 0! + 0!)! = 24


I know im a bit rusty with hex/binary arithmatic but the answer i get with (0! + 0! + 0! + 0!)! is 3 assuming 8 bits:

0! = 0xFF and assuming no carry over:

0xFF + 0xFF = 0xFE

so (0xFF + 0xFF + 0xFF + 0xFF) = 0xFC

!0xFC = 3 Right? Where did I go wrong?

drag
Jul4-03, 12:23 AM
Yeah... I was wondering about the same thing.
0! is a factorial, just like n! for example with n
being any natural number. However 0! = 1.

Live long and prosper.

kauai_diver
Jul4-03, 12:32 AM
LOL you beat me to it, just got schooled from my wife of all people!

She said !0 would be 0xFF, but 0! = 1.

Factorial notation comes AFTER the value.

and 4! = 24.