as title says , i'm talking about http://codeforces.me/problemset/problem/327/B problem
that judged as TLE. my submission was only trying to print prime numbers
what are other sequences that aren't prime and aren't divisible terms ?
| # | User | Rating |
|---|---|---|
| 1 | jiangly | 3810 |
| 2 | Benq | 3676 |
| 3 | Kevin114514 | 3655 |
| 4 | maroonrk | 3463 |
| 5 | strapple | 3447 |
| 6 | Um_nik | 3387 |
| 7 | heuristica | 3322 |
| 8 | turmax | 3317 |
| 9 | tourist | 3307 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 156 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | Um_nik | 141 |
| 5 | Errichto | 139 |
| 6 | adamant | 137 |
| 7 | AmShZ | 136 |
| 8 | BledDest | 132 |
| 9 | maroonrk | 131 |
| 10 | qwexd | 129 |
as title says , i'm talking about http://codeforces.me/problemset/problem/327/B problem
that judged as TLE. my submission was only trying to print prime numbers
what are other sequences that aren't prime and aren't divisible terms ?
| Name |
|---|



what method did you use to print the prime numbers? (there is one in NlogN, N being the range of the numbers) and the PNT guarantees that there exist about 10^5 < 10^7/ln(10^7) prime number <10^7, so why not prime numbers?
My method is about O(N*N) so TLE is judged what is NlogN method ?
use the Sieve of Eratosthenes, the principle is easy and it will pass the judge's tests
Use sieve of Erathosphene. AC
Also you can print n to 2n-1 and get AC :P