#215
Scrieţi un program care citeşte de la tastatură un număr natural nenul n cu exact 5 cifre şi construieşte un tablou bidimensional completat cu cifrele numărului citit, după o regulă precizată.
Variante Bacalaureat 2009
| Problema | GenMat6 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64767819 | Utilizator | |
| Fișier | genmat6.cpp | Dimensiune | 734 B |
| Data încărcării | 28 Mai 2026, 19:44 | Scor/rezultat | 100 puncte |
genmat6.cpp: In function ‘int main()’: genmat6.cpp:16:25: warning: statement has no effect [-Wunused-value] 16 | a[i][j] == 0; | ~~~~~~~~^~~~ genmat6.cpp:19:17: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 19 | for (int k=1; k<i; k++) | ^~~ genmat6.cpp:21:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 21 | a[i][j] = n/p%10; | ^ genmat6.cpp:25:17: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 25 | for (int k=1; k<j; k++) | ^~~ genmat6.cpp:27:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 27 | a[i][j] = n/p%10; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.002 secunde | OK. | 20 | 20 | ||
| 4 | 0.002 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat6 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ă.