[Tutor] [Edu-sig] collection of ACM programming problems (fwd)
Fri, 12 Jan 2001 15:21:14 -0800 (PST)
On Fri, 12 Jan 2001, Jose Amoreira wrote:
> Sorry to drop in, but I thought that you just have to go up to the
> *square root* (instead of half) of the tested number. This is not a
> formal demonstration, but if the tested number devides evenly by its
> half, it also devides evenly by 2, wich comes first in this increasing
> series of devides.
Yes, that's correct. If you haven't found a factor by the time you reach
the square root, logic suggests you're not going to find one.
_Deirdre * http://www.sfknit.org * http://www.deirdre.net
"We have an open door policy." -- Sheridan
"And an open airlock policy." -- Ivanova