#1290
CifreGen3
Se dau două numere n m
. Să se genereze toate numerele cu exact n
cifre mai mici decât m
cu proprietatea că prima și ultima cifră sunt egale.
Problema | CifreGen3 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49558294 | Utilizator | |
Fișier | cifregen3.cpp | Dimensiune | 1.21 KB |
Data încărcării | 06 Martie 2024, 22:47 | Scor / rezultat | Eroare de compilare |
cifregen3.cpp:1:29: error: stray '#' in program [10:42 PM, 3/6/2024] Mihai: #include<bits/stdc++.h> ^ cifregen3.cpp:32:29: error: stray '#' in program [10:42 PM, 3/6/2024] Mihai: #include<bits/stdc++.h> ^ cifregen3.cpp:1:1: error: expected unqualified-id before '[' token [10:42 PM, 3/6/2024] Mihai: #include<bits/stdc++.h> ^ cifregen3.cpp: In function 'void afisare()': cifregen3.cpp:6:27: error: 'cout' was not declared in this scope for(int i=1;i<=n;i++) cout<<x[i]; ^ cifregen3.cpp:7:5: error: 'cout' was not declared in this scope cout<<'\n'; ^ cifregen3.cpp: In function 'bool valid(int)': cifregen3.cpp:12:30: error: 'abs' was not declared in this scope if(k>1 && abs(x[k-1]-x[k])<2) return false; ^ cifregen3.cpp: In function 'int main()': cifregen3.cpp:28:1: error: 'cin' was not declared in this scope cin>>n>>m; ^ cifregen3.cpp: At global scope: cifregen3.cpp:31:1: error: expected unqualified-id before '[' token [10:42 PM, 3/6/2024] Mihai: Pb 12 ^ cifregen3.cpp:34:5: error: redefinition of 'int n' int n,m,x[9]; ^ cifregen3.cpp:3:5: error: 'int n' previously declared here int n,m,x[11]; ^ cifregen3.cpp:34:7: error: redefinition of 'int m' int n,m,x[9]; ^ cifregen3.cpp:3:7: error: 'int m' previously declared here int n,m,x[11]; ^ cifregen3.cpp:34:12: error: conflicting declaration 'int x [9]' int n,m,x[9]; ^ cifregen3.cpp:3:9: error: 'x' has a previous declaration as 'int x [11]' int n,m,x[11]; ^ cifregen3.cpp: In function 'void afisare(int)': cifregen3.cpp:43:31: error: 'cout' was not declared in this scope for(int i=1;i<=k;i++) cout<<x[i]; ^ cifregen3.cpp:44:9: error: 'cout' was not declared in this scope cout<<'\n'; ^ cifregen3.cpp: In function 'bool valid(int)': cifregen3.cpp:48:6: error: redefinition of 'bool valid(int)' bool valid(int k){ ^ cifregen3.cpp:10:6: error: 'bool valid(int)' previously defined here bool valid(int k){ ^ cifregen3.cpp: In function 'void backtr(int)': cifregen3.cpp:54:6: error: redefinition of 'void backtr(int)' void backtr(int k){ ^ cifregen3.cpp:16:6: error: 'void backtr(int)' previously defined here void backtr(int k){ ^ cifregen3.cpp: In function 'int main()': cifregen3.cpp:64:5: error: redefinition of 'int main()' int main() ^ cifregen3.cpp:26:5: error: 'int main()' previously defined here int main() ^ cifregen3.cpp:66:5: error: 'cin' was not declared in this scope cin>>n; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifreGen3 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ă.