3 ms·Minor comment in your sample code: When searching for factors of N you only need to search up to sqrt(N).by jvandonsel 12y agoMinor comment in your sample code: When searching for factors of N you only need to search up to sqrt(N).