#2223
Se dă n număr natural. Aflaţi cel mai mare număr natural care are numărul de cifre şi suma cifrelor egale cu suma cifrelor lui n.
| Problema | cifre004 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62774833 | Utilizator | |
| Fișier | cifre004.cpp | Dimensiune | 566 B |
| Data încărcării | 02 Februarie 2026, 10:32 | Scor/rezultat | 50 puncte |
cifre004.cpp: In function 'int main()': cifre004.cpp:7:22: warning: unused variable 'p' [-Wunused-variable] long long int n, p=1, s=0, nrfin=0; ^ cifre004.cpp:7:32: warning: unused variable 'nrfin' [-Wunused-variable] long long int n, p=1, s=0, nrfin=0; ^ cifre004.cpp:9:19: warning: unused variable 'cn' [-Wunused-variable] long long int cn=n; ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | Raspuns gresit. | 5 | 0 | Exemplu | |
| 2 | 0 secunde | OK. | 5 | 5 | ||
| 3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 4 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 5 | 0 secunde | OK. | 5 | 5 | ||
| 6 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 7 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 8 | 0 secunde | OK. | 5 | 5 | ||
| 9 | 0 secunde | OK. | 5 | 5 | ||
| 10 | 0 secunde | OK. | 5 | 5 | ||
| 11 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 12 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 13 | 0 secunde | OK. | 5 | 5 | ||
| 14 | 0 secunde | OK. | 5 | 5 | ||
| 15 | 0 secunde | OK. | 5 | 5 | ||
| 16 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 17 | 0 secunde | OK. | 5 | 5 | ||
| 18 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 19 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 20 | 0 secunde | OK. | 5 | 5 | ||
| Punctaj total | 50 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema cifre004 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ă.