#4918
O persoana are de urcat n trepte. Aflaţi in câte moduri poate urca cele n trepte.
| Problema | TreptePD | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64495895 | Utilizator | |
| Fișier | treptepd.cpp | Dimensiune | 363 B |
| Data încărcării | 11 Mai 2026, 10:50 | Scor/rezultat | 20 puncte |
treptepd.cpp: In function ‘int main()’: treptepd.cpp:11:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 11 | if(n==1) | ^~ treptepd.cpp:12:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 12 | cout<<1; return 0; | ^~~~~~ treptepd.cpp:13:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 13 | if(n==2) | ^~ treptepd.cpp:14:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 14 | cout<<2; return 0; | ^~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 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 | OK. | 20 | 20 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema TreptePD 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ă.