#1291
Se dau două numere n m. Să se genereze toate numerele cu exact n cifre mai mici decât m cu proprietatea că diferența în valoare absolută dintre oricare două cifre consecutive este cel puțin 2.
| Problema | CifreGen4 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62976862 | Utilizator | |
| Fișier | cifregen4.cpp | Dimensiune | 903 B |
| Data încărcării | 09 Februarie 2026, 13:04 | Scor/rezultat | Eroare de compilare |
cifregen4.cpp: In function 'int main()': cifregen4.cpp:10:5: error: 'inti' was not declared in this scope inti,j; ^ cifregen4.cpp:10:10: error: 'j' was not declared in this scope inti,j; ^ cifregen4.cpp:12:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ cifregen4.cpp:14:14: error: 'a' was not declared in this scope cin>>a[i][j]; ^ cifregen4.cpp:15:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ cifregen4.cpp:16:9: error: 'b' was not declared in this scope b[n][i]=a[n][i]; ^ cifregen4.cpp:16:17: error: 'a' was not declared in this scope b[n][i]=a[n][i]; ^ cifregen4.cpp:17:9: error: 'i' was not declared in this scope for(i=n-1;i>=1;i--) ^ cifregen4.cpp: At global scope: cifregen4.cpp:29:5: error: expected unqualified-id before ',' token int ,n,s,x[41]; ^ cifregen4.cpp:29:6: error: redefinition of 'int n' int ,n,s,x[41]; ^ cifregen4.cpp:6:5: error: 'int n' previously declared here int n,m,x[16]; ^ cifregen4.cpp:29:14: error: conflicting declaration 'int x [41]' int ,n,s,x[41]; ^ cifregen4.cpp:6:9: error: 'x' has a previous declaration as 'int x [16]' int n,m,x[16]; ^ cifregen4.cpp:30:5: error: redefinition of 'int n' int n,m,x[8]; ^ cifregen4.cpp:6:5: error: 'int n' previously declared here int n,m,x[16]; ^ cifregen4.cpp:30:7: error: redefinition of 'int m' int n,m,x[8]; ^ cifregen4.cpp:6:7: error: 'int m' previously declared here int n,m,x[16]; ^ cifregen4.cpp:30:12: error: conflicting declaration 'int x [8]' int n,m,x[8]; ^ cifregen4.cpp:6:9: error: 'x' has a previous declaration as 'int x [16]' int n,m,x[16]; ^ cifregen4.cpp: In function 'int verif(int)': cifregen4.cpp:46:12: error: expected ')' before 'return' return 0; ^ cifregen4.cpp:41:9: warning: unused variable 'i' [-Wunused-variable] int i; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifreGen4 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ă.