Home > Back-end >  C, the biggest divisor, programmers who help me to look at the error.
C, the biggest divisor, programmers who help me to look at the error.

Time:11-09

CodePudding user response:

Your test method has a problem, first of all, should start from small digital test, and secondly, parity detection, even very simple, the biggest factor is n/2, an odd number of words need to prepare a prime table 3, 5, 7... Until no greater than SQRT (n) of the largest prime number, from small to large, try one by one in addition to the practical application can save 16 prime Numbers within the scope of more than 3500 ~ ~ ~

CodePudding user response:

Bosses, can play out the code to the

CodePudding user response:

1 second limitation, but for the biggest factor of a number, it should be easy to the