#2858
Se consideră un șir a1, a2, …, an de numere naturale.
10.3 și aflate pe poziții impare.| Problema | pv | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64237641 | Utilizator | |
| Fișier | pv.cpp | Dimensiune | 703 B |
| Data încărcării | 24 Aprilie 2026, 15:22 | Scor/rezultat | Eroare de compilare |
pv.cpp: In function ‘int main()’: pv.cpp:14:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 14 | for(i=1;i<=n;i++) | ^~~ pv.cpp:17:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 17 | cout<<s<<endl; | ^~~~ pv.cpp:28:13: warning: unused variable ‘nr’ [-Wunused-variable] 28 | int nr; | ^~ pv.cpp:26:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 26 | for(i=1;i<=n;i++) | ^~~ pv.cpp:29:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 29 | nr++; | ^~ pv.cpp:29:9: error: ‘nr’ was not declared in this scope; did you mean ‘n’? 29 | nr++; | ^~ | n
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pv 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ă.