|
If you don't know how could you code it ?
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
That is what QA is for...
|
|
|
|
|
Rob Philpott wrote: How many matches need to be played to determine the winner?
[edit] Ignore me. My brain is addled. I hate word problems.[/edit]
Marc
|
|
|
|
|
All these mathematics problems make my brain hurt.
I come to the lounge to lounge not remember my quadratic equation lessons.
|
|
|
|
|
I get the same trying to solve the Gin problem.
speramus in juniperus
|
|
|
|
|
For me will be the wine problem / solution in less then an hour..
The signature is in building process.. Please wait...
|
|
|
|
|
The good news is that alcohol is a solution...
speramus in juniperus
|
|
|
|
|
Nagy Vilmos wrote: alcohol is a solution
At this time of the day, yes..
The signature is in building process.. Please wait...
|
|
|
|
|
|
Of course less than an hour.. The wine was good so..
The signature is in building process.. Please wait...
|
|
|
|
|
You can do math for fun sometimes..
The signature is in building process.. Please wait...
|
|
|
|
|
oxymoron
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
Now that we're in the mood..
Determine how often (x & y) == 0 for x and y both 32bit integers.
for how many pairs (x, y) where x and y are both 32bit integers, (x & y) == 0 .
|
|
|
|
|
Every single time if I set x = 0 ...
|
|
|
|
|
|
I y is chosen as x bit wise negated, it's true for all 32 bit integers.
y=¬x
¬x & x == 0
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Right, so that's 232 pairs, do you want to use that as your answer?
|
|
|
|
|
There would be more pairs than that, but I just don't have the time to figure it out now.
You have to figure in the numbers that also have their zero bits in the same place as the first number and only the must have zeros where the original number has a one.
All I can say it's way more than 232 by some factor that I have yet to determine, but don't have the time to do so.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
|
Every single time if I set y = 0 ...
|
|
|
|
|
That looks suspiciously like Griffs answer, and it's still just as true (and incomplete).
|
|
|
|
|
Well I'm an IT guy after all
|
|
|
|
|
That means you copy from someone else?
|
|
|
|
|
Story of a programmer
|
|
|
|
|
If the programmer and/or the pc are drunk enough everything related to work is wrong
Microsoft ... the only place where VARIANT_TRUE != true
|
|
|
|