#247
Se dau mai multe numere naturale, fiecare cu cel mult 9 cifre. Să se afişeze, în ordine descrescătoare, toate cifrele care apar în numerele date.
Variante Bacalaureat 2009
| Problema | CifreOrd1 | Operații I/O |
cifreord1.in/cifreord1.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64798058 | Utilizator | |
| Fișier | cifreord1.cpp | Dimensiune | 575 B |
| Data încărcării | 02 Iunie 2026, 09:14 | Scor/rezultat | Eroare de compilare |
cifreord1.cpp: In function ‘int main()’: cifreord1.cpp:11:12: error: ‘x’ was not declared in this scope 11 | if(x==0) | ^ cifreord1.cpp:10:5: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 10 | while(fin>>n) | ^~~~~ cifreord1.cpp:13:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 13 | while(n) | ^~~~~ cifreord1.cpp:17:17: error: expected ‘;’ before ‘}’ token 17 | n/10 | ^ | ; 18 | } | ~ cifreord1.cpp:17:14: warning: statement has no effect [-Wunused-value] 17 | n/10 | ~^~~ cifreord1.cpp:20:9: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 20 | while(fr[i]>0) | ^~~~~ cifreord1.cpp:22:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 22 | fr[i]--; | ^~ cifreord1.cpp:23:18: error: expected ‘;’ before ‘if’ 23 | cnt++ | ^ | ; 24 | if(cnt==20) | ~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifreOrd1 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ă.