#2576
Să se afișeze numerele prime de la 1 la n.
| Problema | Ciurul Lui Eratosthenes | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63088318 | Utilizator | |
| Fișier | ciurul_lui_eratosthenes.cpp | Dimensiune | 382 B |
| Data încărcării | 13 Februarie 2026, 10:45 | Scor/rezultat | Eroare de compilare |
ciurul_lui_eratosthenes.cpp: In function 'int main()': ciurul_lui_eratosthenes.cpp:7:3: warning: capture of variable 'v' with non-automatic storage duration [enabled by default] [v[0] = v[1] = 1; ^ ciurul_lui_eratosthenes.cpp:5:8: note: 'int v [1000001]' declared here int n, v[1000001]; ^ ciurul_lui_eratosthenes.cpp:7:4: error: expected ',' before '[' token [v[0] = v[1] = 1; ^ ciurul_lui_eratosthenes.cpp:7:4: error: expected identifier before '[' token ciurul_lui_eratosthenes.cpp:7:18: error: expected ']' before ';' token [v[0] = v[1] = 1; ^ ciurul_lui_eratosthenes.cpp: In lambda function: ciurul_lui_eratosthenes.cpp:7:18: error: expected '{' before ';' token ciurul_lui_eratosthenes.cpp: In function 'int main()': ciurul_lui_eratosthenes.cpp:13:6: warning: unused variable 'x' [-Wunused-variable] int x, C = 0; ^ ciurul_lui_eratosthenes.cpp:13:9: warning: unused variable 'C' [-Wunused-variable] int x, C = 0; ^ ciurul_lui_eratosthenes.cpp:16:2: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Ciurul Lui Eratosthenes 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ă.