Update Time_Complexity.md

Modify isPrime function
This commit is contained in:
Liquor
2024-06-22 12:00:59 +08:00
committed by GitHub
parent 3200de1f73
commit b878af0ccf

View File

@@ -44,6 +44,7 @@ void hello (int n){
```c
bool isPrime (int n){
if (num <= 1) return false;
for( int x = 2 ; x * x <= n ; x ++ )
if( n % x == 0 )
return false;