#3275
Se dau 3 numere naturale, fiecare având câte două cifre. Afișați-le pe acelea care au suma cifrelor maximă.
CNFB - Concurs de pregatire, clasa a 5-a
| Problema | nrSumCifMax | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64966968 | Utilizator | |
| Fișier | nrsumcifmax.cpp | Dimensiune | 278 B |
| Data încărcării | 27 Iunie 2026, 15:54 | Scor/rezultat | 0 puncte |
nrsumcifmax.cpp: In function ‘int main()’: nrsumcifmax.cpp:14:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 14 | if (a=b && b>c) | ~^~~~~~~~~ nrsumcifmax.cpp:15:10: warning: right operand of comma operator has no effect [-Wunused-value] 15 | cout<<a,b; | ^ nrsumcifmax.cpp:16:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 16 | if (a=c && c>b) | ~^~~~~~~~~ nrsumcifmax.cpp:17:10: warning: right operand of comma operator has no effect [-Wunused-value] 17 | cout<<a,c; | ^ nrsumcifmax.cpp:18:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 18 | if (b=c && c>a) | ~^~~~~~~~~ nrsumcifmax.cpp:19:10: warning: right operand of comma operator has no effect [-Wunused-value] 19 | cout<<b,c; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 2 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 10 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema nrSumCifMax 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ă.