View Single Post
Old May 3rd, 2008, 3:52 PM   #12
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

Don't worry about int overflows for any of the questions. The only one you might need to worry about that for is the last question, but that depends entirely on how you do it.

From now on, assume whenever I'm talking about "integers" or "values", I'm talking about anything calculatable with a 32-bit signed integer. If you ever need to use a long long or anything larger than 32-bits, it will be clearly stated.

For the definition of a prime number, consult Wikipedia. I'll say nothing more, because half of the beginner challenge is just writing a proper prime function (of course, it can still be as slow as you wish).
Sane is online now   Reply With Quote