Created
November 8, 2016 05:01
-
-
Save wowoto9772/1b95dc38d2001071048d2e7506a3f3d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = 2; i*i <= n; i++){ | |
if (!prime[i]){ | |
for (int j = i*i; j <= n; j += i){ | |
prime[j] = true; // prime[j] : false > j is prime | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment