#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 | #64816915 | Utilizator | |
| Fișier | pv.cpp | Dimensiune | 694 B |
| Data încărcării | 03 Iunie 2026, 11:46 | Scor/rezultat | Eroare de compilare |
pv.cpp: In function ‘int main()’: pv.cpp:11:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for (int i = 1; i <= n; i++) | ^~~ pv.cpp:15:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 15 | if (i % 2 == 0) | ^~ pv.cpp:15:13: error: ‘i’ was not declared in this scope 15 | if (i % 2 == 0) | ^ pv.cpp:17:15: error: ‘i’ was not declared in this scope 17 | if (v[i] % 10 == 0) | ^ pv.cpp:19:15: error: ‘i’ was not declared in this scope 19 | if (v[i] % 3 == 0 && i % 2 == 1) | ^ pv.cpp: At global scope: pv.cpp:22:5: error: ‘cout’ does not name a type 22 | cout << div2 << "\n"; | ^~~~ pv.cpp:23:5: error: ‘cout’ does not name a type 23 | cout << poz2 << "\n"; | ^~~~ pv.cpp:24:5: error: ‘cout’ does not name a type 24 | cout << div10 << "\n"; | ^~~~ pv.cpp:25:5: error: ‘cout’ does not name a type 25 | cout << div3poz1 ; | ^~~~ pv.cpp:26:5: error: expected unqualified-id before ‘return’ 26 | return 0; | ^~~~~~ pv.cpp:27:1: error: expected declaration before ‘}’ token 27 | } | ^
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ă.