#3291
Se citesc numere naturale cuprinse între 1 și 30.000.000 până la întâlnirea numărului 0. Să se afișeze valoarea duplicat.
| Problema | Memory010 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 4 MB
/
Stivă 0.1 MB
|
| Id soluție | #64893231 | Utilizator | |
| Fișier | memory010.cpp | Dimensiune | 710 B |
| Data încărcării | 10 Iunie 2026, 09:26 | Scor/rezultat | Eroare de compilare |
memory010.cpp: In function ‘int main()’: memory010.cpp:21:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 21 | if (!adauga(x)) | ^~ memory010.cpp:24:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 24 | gasit=true; | ^~~~~ memory010.cpp: At global scope: memory010.cpp:27:5: error: ‘cout’ does not name a type 27 | cout << duplicat; | ^~~~ memory010.cpp:28:5: error: expected unqualified-id before ‘return’ 28 | return 0; | ^~~~~~ memory010.cpp:29:1: error: expected declaration before ‘}’ token 29 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Memory010 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ă.