#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 | #64321590 | Utilizator | |
| Fișier | nrsumcifmax.cpp | Dimensiune | 353 B |
| Data încărcării | 29 Aprilie 2026, 15:30 | Scor/rezultat | 100 puncte |
nrsumcifmax.cpp: In function ‘int main()’: nrsumcifmax.cpp:10:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 10 | if(b%10+b/10>ma) | ^~ nrsumcifmax.cpp:12:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 12 | if(c%10+c/10>ma) | ^~ nrsumcifmax.cpp:12:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] nrsumcifmax.cpp:14:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 14 | if (ma==a%10+a/10) | ^~
| 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.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
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ă.