Skip to content

Commit 412d3ff

Browse files
committed
file rename to standards
1 parent 0e3a57a commit 412d3ff

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

math/primes_up_to_10^8.cpp renamed to math/primes_up_to_billion.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#include<iostream>
21
#include <cstring>
2+
#include <iostream>
33

44
char prime[100000000];
55

66
void Sieve(int64_t n) {
77
memset(prime, '1', sizeof(prime)); // intitize '1' to every index
8-
prime[0] = '0'; // 0 is not prime
9-
prime[1] = '0'; // 1 is not prime
8+
prime[0] = '0'; // 0 is not prime
9+
prime[1] = '0'; // 1 is not prime
1010
for (int p = 2; p * p <= n; p++) {
1111
if (prime[p] == '1') {
1212
for (int i = p * p; i <= n; i += p)
@@ -15,7 +15,6 @@ void Sieve(int64_t n) {
1515
}
1616
}
1717

18-
1918
int main() {
2019
Sieve(100000000);
2120
int64_t n;

0 commit comments

Comments
 (0)