#2858
pv
Se consideră un șir a
1
, a
2
, …, a
n
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 | #53799766 | Utilizator | |
Fișier | pv.cpp | Dimensiune | 323 B |
Data încărcării | 12 Noiembrie 2024, 08:36 | Scor / rezultat | Eroare de compilare |
pv.cpp: In function 'int main()': pv.cpp:6:1: error: 'cin' was not declared in this scope cin>>n; ^ pv.cpp:6:1: note: suggested alternative: In file included from pv.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ pv.cpp:9:1: error: 'cout' was not declared in this scope cout<<v[i]<<" "; ^ pv.cpp:9:1: note: suggested alternative: In file included from pv.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ pv.cpp:13:7: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] if(i%2==1 & v[i]%3==0) s3+=v[i]; ^ pv.cpp:15:1: error: 'cout' was not declared in this scope cout<<s1<<endl; ^ pv.cpp:15:1: note: suggested alternative: In file included from pv.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ pv.cpp:15:11: error: 'endl' was not declared in this scope cout<<s1<<endl; ^ pv.cpp:15:11: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from pv.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^
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ă.