Skip to content

Commit

Permalink
merge pr, fix isPrimeNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Dec 31, 2020
1 parent 834556d commit 43155e5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions util/src/tc_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,13 +895,8 @@ void TC_Common::ignorePipe()

bool TC_Common::isPrimeNumber(size_t n)
{
<<<<<<< HEAD
size_t nn = (size_t) sqrt((double) n);
for (size_t i = 2; i < nn; i++)
=======
size_t nn = (size_t)sqrt((double)n);
for(size_t i = 2; i <= nn;i++)
>>>>>>> fix tc_common prime judgment bug
{
if (n % i == 0)
{
Expand Down

0 comments on commit 43155e5

Please sign in to comment.