#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 | #64481717 | Utilizator | |
| Fișier | numere.c | Dimensiune | 985 B |
| Data încărcării | 10 Mai 2026, 10:27 | Scor/rezultat | 100 puncte |
numere.c: In function ‘main’: numere.c:25:12: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 25 | } else if (c > max3) | ^~ numere.c:28:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 28 | if (d > max) { | ^~ numere.c:35:12: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 35 | } else if (d > max3) | ^~ numere.c:38:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 38 | if (e > max) { | ^~ numere.c:45:12: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 45 | } else if (e > max3) | ^~ numere.c:48:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 48 | int Sum = max + max2 + max3; | ^~~ numere.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d%d%d%d%d", &a, &b, &c, &d, &e); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | ||
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| 6 | 0.001 secunde | OK. | 10 | 10 | ||
| 7 | 0.001 secunde | OK. | 10 | 10 | ||
| 8 | 0.001 secunde | OK. | 10 | 10 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| 10 | 0.002 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
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ă.