This file contains hidden or 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
| #define N 1000001 | |
| int seive[N]; | |
| void fillSieve(){ | |
| int i, j; | |
| seive[0] = seive[1] = 1; // 0, 1 aren't primes | |
| int n = sqrt(N); | |
| i = 2; | |
| for(j=2; i*j<N; j++) | |
| seive[i*j] = 1; | |
| for(i=3; i<=n; i+=2){ |
This file contains hidden or 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
| ### Keybase proof | |
| I hereby claim: | |
| * I am pallavagarwal07 on github. | |
| * I am pallavag (https://keybase.io/pallavag) on keybase. | |
| * I have a public key whose fingerprint is EF10 9599 EBA3 EA30 B549 444E EDBB 91C1 DA77 D79D | |
| To claim this, I am signing this object: |
This file contains hidden or 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
| 117.197.58.189 |
NewerOlder