#3312
Eratostene1
Se dau n
numere naturale. Aflaţi câte dintre aceste numere sunt prime.
NeuroN
Problema | Eratostene1 | Operații I/O |
![]() eratostene1.in /eratostene1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #51050433 | Utilizator | |
Fișier | eratostene1.cpp | Dimensiune | 745 B |
Data încărcării | 21 Mai 2024, 12:02 | Scor / rezultat | Eroare de compilare |
eratostene1.cpp:3:9: error: macro names must be identifiers #define 500005 ^ eratostene1.cpp:8:9: error: 'M' was not declared in this scope bitset <M> v; ^ eratostene1.cpp:8:10: error: template argument 1 is invalid bitset <M> v; ^ eratostene1.cpp:8:13: error: invalid type in declaration before ';' token bitset <M> v; ^ eratostene1.cpp: In function 'void ciur()': eratostene1.cpp:13:8: error: invalid types 'int[int]' for array subscript v[0]=1; ^ eratostene1.cpp:14:20: error: 'M' was not declared in this scope for(i=2;2*i+1<=M;i++) ^ eratostene1.cpp:15:15: error: invalid types 'int[int]' for array subscript if(v[i]==0) ^ eratostene1.cpp:19:16: error: invalid types 'int[int]' for array subscript v[j]=1; ^ eratostene1.cpp: In function 'int main()': eratostene1.cpp:40:21: error: invalid types 'int[int]' for array subscript if(v[poz]==0) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Eratostene1 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.