#4382
Se citește un vector cu n elemente, numere naturale. Să se înlocuiască fiecare element prim din vector cu 0, apoi să se afișeze vectorul.
| Problema | Inlocuire5 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64604088 | Utilizator | |
| Fișier | inlocuire5.cpp | Dimensiune | 1.40 KB |
| Data încărcării | 18 Mai 2026, 10:44 | Scor/rezultat | 0 puncte |
inlocuire5.cpp: In function ‘void IsPrime(long long int)’: inlocuire5.cpp:24:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 24 | if (n % i == 0) | ^~ inlocuire5.cpp:25:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 25 | cnt++; break; | ^~~~~ inlocuire5.cpp: In function ‘int main()’: inlocuire5.cpp:60:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 60 | freopen("input.txt","r",stdin); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ inlocuire5.cpp:61:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 61 | freopen("output.txt","w",stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 40 | 0 | ||
| 3 | Depășit | Limita de timp depășită | 40 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Inlocuire5 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ă.