#163
Să se șteargă dintr-un vector toate elementele care sunt numere prime.
| Problema | stergere | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64625983 | Utilizator | |
| Fișier | stergere.cpp | Dimensiune | 1.20 KB |
| Data încărcării | 19 Mai 2026, 10:51 | Scor/rezultat | Eroare de compilare |
stergere.cpp: In function ‘int Prim(int)’: stergere.cpp:17:1: error: a function-definition is not allowed here before ‘{’ token 17 | { | ^ stergere.cpp:36:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 36 | int main() | ^~ stergere.cpp:36:9: note: remove parentheses to default-initialize a variable 36 | int main() | ^~ | -- stergere.cpp:36:9: note: or replace parentheses with braces to value-initialize a variable stergere.cpp:37:1: error: a function-definition is not allowed here before ‘{’ token 37 | { | ^ stergere.cpp: In function ‘int main()’: stergere.cpp:82:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 82 | for(i=1;i<=n;i++) | ^~~ stergere.cpp:84:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 84 | return 0; | ^~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema stergere 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ă.