#559
Se dau 5 numere distincte. Să se determine suma celor mai mari 3 dintre ele.
| Problema | 5numere | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63039667 | Utilizator | |
| Fișier | numere.cpp | Dimensiune | 653 B |
| Data încărcării | 11 Februarie 2026, 12:46 | Scor/rezultat | 80 puncte |
numere.cpp: In function 'int main()': numere.cpp:8:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(b>max1) max1=b; ^ numere.cpp:9:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(c>max1) max1=c; ^ numere.cpp:10:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(d>max1) max1=d; ^ numere.cpp:11:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(e>max1) max1=e; ^ numere.cpp:14:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a<max1) max2=a; ^ numere.cpp:15:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(b<max1 && b>max2) max2=b; ^ numere.cpp:15:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(b<max1 && b>max2) max2=b; ^ numere.cpp:16:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(c<max1 && c>max2) max2=c; ^ numere.cpp:16:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(c<max1 && c>max2) max2=c; ^ numere.cpp:17:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(d<max1 && d>max2) max2=d; ^ numere.cpp:17:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(d<max1 && d>max2) max2=d; ^ numere.cpp:18:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(e<max1 && e>max2) max2=e; ^ numere.cpp:18:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(e<max1 && e>max2) max2=e; ^ numere.cpp:21:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a<max2) max3=a; ^ numere.cpp:22:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(b<max2 && b>max3) max3=b; ^ numere.cpp:22:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(b<max2 && b>max3) max3=b; ^ numere.cpp:23:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(c<max2 && c>max3) max3=c; ^ numere.cpp:23:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(c<max2 && c>max3) max3=c; ^ numere.cpp:24:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(d<max2 && d>max3) max3=d; ^ numere.cpp:24:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(d<max2 && d>max3) max3=d; ^ numere.cpp:25:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(e<max2 && e>max3) max3=e; ^ numere.cpp:25:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(e<max2 && e>max3) max3=e; ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 10 | 10 | ||
| 2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0 secunde | OK. | 10 | 10 | ||
| 4 | 0 secunde | OK. | 10 | 10 | ||
| 5 | 0 secunde | OK. | 10 | 10 | ||
| 6 | 0 secunde | OK. | 10 | 10 | ||
| 7 | 0 secunde | OK. | 10 | 10 | ||
| 8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0 secunde | OK. | 10 | 10 | ||
| 10 | 0 secunde | OK. | 10 | 10 | ||
| Punctaj total | 80 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema 5numere 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ă.