#303
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 | #56231759 | Utilizator | |
Fișier | eratostene.cpp | Dimensiune | 626 B |
Data încărcării | 11 Februarie 2025, 09:45 | Scor / rezultat | Eroare de compilare |
eratostene.cpp:30:2: error: stray '\302' in program } ^ eratostene.cpp:30:2: error: stray '\240' in program eratostene.cpp:31:1: error: stray '\302' in program fout<<ct; ^ eratostene.cpp:31:1: error: stray '\240' in program eratostene.cpp:31:1: error: stray '\302' in program eratostene.cpp:31:1: error: stray '\240' in program eratostene.cpp: In function 'void generare()': eratostene.cpp:14:11: error: invalid types 'bool[int]' for array subscript ciur[0] = ciur [1] = 1; ^ eratostene.cpp:14:22: error: invalid types 'bool[int]' for array subscript ciur[0] = ciur [1] = 1; ^ eratostene.cpp:16:15: error: invalid types 'bool[int]' for array subscript ciur[1] = 1; ^ eratostene.cpp:18:19: error: invalid types 'bool[int]' for array subscript if(!ciur[i]) ^ eratostene.cpp:20:23: error: invalid types 'bool[int]' for array subscript ciur[j] = 1; ^ eratostene.cpp: In function 'int main()': eratostene.cpp:29:23: error: invalid types 'bool[int]' for array subscript if(!ciur[x]) ct++; ^
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ă.