Submission #6434555
Source Code Expand
#include <bits/stdc++.h> using namespace std; const int N = (int) 1e5 + 5; int n; int nprime; int p[N], f[N]; void sieve() { int LIM = 55555; for (int i = 2; i <= LIM; i++) { if (f[i] == 0) f[i] = p[++nprime] = i; int j = 0; while (j < nprime && p[j] < f[i] && p[j + 1] * i <= LIM) { f[p[j + 1] * i] = p[j + 1]; j++; } } } int main() { //freopen(".inp", "r", stdin); freopen(".out", "w", stdout); cin >> n; for (int i = 1; i <= n; i++) cout << p[i] << " "; return 0; }
Submission Info
Submission Time | |
---|---|
Task | D - Five, Five Everywhere |
User | sesshomalong |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 520 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | in01.txt, in02.txt, sample_01.txt, sample_02.txt, sample_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in01.txt | WA | 1 ms | 256 KB |
in02.txt | WA | 1 ms | 256 KB |
sample_01.txt | WA | 1 ms | 256 KB |
sample_02.txt | WA | 1 ms | 256 KB |
sample_03.txt | WA | 1 ms | 256 KB |