#3159
Se citesc un număr natural n având cifrele diferite două câte două și o cifră c. Afișați în ordine crescătoare numerele formate din c cifre distincte care se pot obține din cifrele lui n.
| Problema | numere124 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.4 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64925410 | Utilizator | |
| Fișier | numere124.cpp | Dimensiune | 819 B |
| Data încărcării | 14 Iunie 2026, 20:02 | Scor/rezultat | Eroare de compilare |
numere124.cpp: In function ‘void afisare()’: numere124.cpp:13:13: error: expected ‘;’ before ‘}’ token 13 | cout<<"\n" | ^ | ; 14 | } | ~ numere124.cpp: In function ‘void back(int)’: numere124.cpp:16:6: error: expected ‘(’ before ‘{’ token 16 | for{int i=0;i<nrcif;i++}{ | ^ | ( numere124.cpp:16:6: error: expected primary-expression before ‘{’ token numere124.cpp:16:27: error: expected primary-expression before ‘{’ token 16 | for{int i=0;i<nrcif;i++}{ | ^ numere124.cpp:16:27: error: expected ‘;’ before ‘{’ token 16 | for{int i=0;i<nrcif;i++}{ | ^ | ; numere124.cpp:16:27: error: expected primary-expression before ‘{’ token numere124.cpp:16:27: error: expected ‘)’ before ‘{’ token 16 | for{int i=0;i<nrcif;i++}{ | ~ ^ | ) numere124.cpp:17:12: error: ‘vizitat’ was not declared in this scope 17 | if(vizitat[cifre[i]]==0){ | ^~~~~~~ numere124.cpp:17:26: error: ‘i’ was not declared in this scope 17 | if(vizitat[cifre[i]]==0){ | ^ numere124.cpp:23:11: error: expected ‘}’ before ‘else’ 23 | else{ | ^~~~ numere124.cpp:17:33: note: to match this ‘{’ 17 | if(vizitat[cifre[i]]==0){ | ^ numere124.cpp:28:11: error: ‘vizitat’ was not declared in this scope 28 | vizitat[cifre[i]]=0; | ^~~~~~~ numere124.cpp:28:25: error: ‘i’ was not declared in this scope 28 | vizitat[cifre[i]]=0; | ^ numere124.cpp: At global scope: numere124.cpp:31:1: error: expected declaration before ‘}’ token 31 | } | ^ numere124.cpp: In function ‘int main()’: numere124.cpp:37:22: error: expected ‘;’ before ‘nrcif’ 37 | cifre[nrcif]=n%10 | ^ | ; 38 | nrcif++; | ~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema numere124 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ă.