#1290
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 | #64214084 | Utilizator | |
| Fișier | cifregen3.cpp | Dimensiune | 667 B |
| Data încărcării | 23 Aprilie 2026, 10:56 | Scor/rezultat | 0 puncte |
cifregen3.cpp: In function ‘int valid(int)’: cifregen3.cpp:18:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 18 | for(i=1; i<=k; i++) | ^~~ cifregen3.cpp:20:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | if(x[i]!=x[k]) return 0; | ^~ cifregen3.cpp: In function ‘int main()’: cifregen3.cpp:37:9: warning: unused variable ‘i’ [-Wunused-variable] 37 | int i; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 0 | |||||
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ă.