#3312
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 | #23351736 | Utilizator | |
| Fișier | eratostene1.cpp | Dimensiune | 607 B |
| Data încărcării | 22 Iunie 2020, 19:55 | Scor/rezultat | Eroare de compilare |
eratostene1.cpp:6:12: warning: missing terminating " character [enabled by default] ifstream f("eratostene1.in); ^ eratostene1.cpp:6:1: error: missing terminating " character ifstream f("eratostene1.in); ^ eratostene1.cpp:7:11: error: expected ',' or '...' before '(' token ofstream g("eratostene1.out"); ^ eratostene1.cpp:7:30: error: expected ')' before ';' token ofstream g("eratostene1.out"); ^ eratostene1.cpp: In function 'void citire(int&)': eratostene1.cpp:24:8: error: invalid operands of types 'std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}' and 'int' to binary 'operator>>' f>>n; ^ eratostene1.cpp:27:12: error: invalid operands of types 'std::ifstream(std::ofstream) {aka std::basic_ifstream<char>(std::basic_ofstream<char>)}' and 'int' to binary 'operator>>' f>>nr; ^ eratostene1.cpp:31:5: error: 'g' was not declared in this scope g<<c; ^
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ă.