sorry, stuck with the shifting counter, non-shifting is quicker, believe it or not
Heh, that makes me think of one.. Come up with bitwise-shift and increment (or decrement) functions, using only the bitwise operations. (that doesn't include >> )
I get that all the time as well, teckno I've had oozi, OOzi, Oozi, oozy...
Let's get it right people, it's an o, then a zero, then a z, then an i. But Rob will do fine
Originally posted by Strogian Heh, that makes me think of one.. Come up with bitwise-shift and increment (or decrement) functions, using only the bitwise operations. (that doesn't include >> )
can it include << ? So you're looking for a counter?
so we can use ~ ^ & | and what not, but no >>.
Just making sure I have this correct. I'll be spending the next 4 hours running long tests which need barely to no interaction. This'll give me something to do.
if (i_forgot && this_is_about_code)
language = c++;
Well, I want functions that replace the ++ and >> operations, so naturally you shouldn't use ++ or >> in the function. (<< and -- are also no-good, but I don't think they'd help you anyway )
Looks like you have had some interesting theoretical/mathematical challenges, so far. Heres something practical:
Define a simple hangman program
It takes one word as its only parameter
The user has 2x as many guesses as there are letters in the word to guess the word. the user enters a letter on stdin, the program prints out the word, with that guess and any previous ones revealed as letters in the word, other letter are replaced by *. Also printed out is the number of guesses left before the user runs out of time. So a sample run may go as follows:
hangman sameple
e
***e**e
you have 13 guesses remaining
s
s**e**e
etc.
have fun, this is easy compared to some earlier challenges and will hopefully less able programmers a chance to test their skills.
I deciphered Sepero's first code. I mostly figured it out without a program but used it just to help. Anyway, I have attached the code to decipher the code in Perl. Did anyone else get it?
Heres a java solution for the add 2 numbers without +
Code:
public int add(int a, int b){
BigInteger bigA = new BigInteger(a);
BigInteger bigB = new BigInteger(b);
BigInteger ans = bigA.add(bigB);
return ans.intValue();
}
Sorry for no indent, I did this in galeon
friend: first, it takes 2 minutes to load google; second, it take another 2 minutes to search for something; and third, once it finally stops searching, the Search Results pages come out screwed up (where it shows the google logo up top, the search form, and then some random characters like "[47]GGH9")
zdude255: nope
friend: damn...
zdude255: all your viruses are belong to you
friend: ...
friend: not funny
Design a binary code and write an encoder and decoder such that if as many as 3 bits of a codeword are encoded with errors, the decoder can correct the codeword. Obviously the only purpose of the encoder here is to take a codeword and mess it up in no more than three places. Your word length can be whatever you want, but the number of codewords needs to be at least 4. The shorter the word length and greater the number of codewords, the smarter your code is of course .