#303
Eratostene
Se dau n
numere naturale mai mici decât 1.000.000
. Determinaţi câte dintre ele sunt prime.
Problema | Eratostene | Operații I/O |
eratostene.in /eratostene.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50105449 | Utilizator | |
Fișier | eratostene.cpp | Dimensiune | 414 B |
Data încărcării | 27 Martie 2024, 10:50 | Scor / rezultat | Eroare de compilare |
eratostene.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream fout("eratostene.out") ^ eratostene.cpp: In function 'int main()': eratostene.cpp:9:10: error: 'n' was not declared in this scope fin>>n; ^ eratostene.cpp:10:7: error: 'v' was not declared in this scope v[0]=v[1]=1; ^ eratostene.cpp:17:13: error: 'cnt' was not declared in this scope cnt++; ^ eratostene.cpp:18:10: error: 'fout' was not declared in this scope fout<<cnt; ^ eratostene.cpp:18:16: error: 'cnt' was not declared in this scope fout<<cnt; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Eratostene 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ă.