#4546
Se citesc de la tastatură numere naturale până la apariția lui zero. Să se determine cea mai mare valoare care poate obține înmulțind două valori diferite dintre cele citite.
| Problema | ProdusMaxime | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64855950 | Utilizator | |
| Fișier | produsmaxime.cpp | Dimensiune | 459 B |
| Data încărcării | 07 Iunie 2026, 17:07 | Scor/rezultat | 0 puncte |
produsmaxime.cpp: In function ‘int main()’: produsmaxime.cpp:15:14: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 15 | if(n != 0 && n>max1) | ^~ produsmaxime.cpp:17:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 17 | max1=n; | ^~~~ produsmaxime.cpp:5:11: warning: unused variable ‘i’ [-Wunused-variable] 5 | int n,i,p,max1,max2; | ^ produsmaxime.cpp:20:5: warning: ‘max2’ may be used uninitialized [-Wmaybe-uninitialized] 20 | if(max1==max2) | ^~ produsmaxime.cpp:5:20: note: ‘max2’ was declared here 5 | int n,i,p,max1,max2; | ^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 6 | 0.002 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ProdusMaxime 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ă.