#496
Numarare4
Se dă un vector cu n
numere naturale. Să se determine câte dintre elementele vectorului sunt prime cu ultimul element.
Problema | Numarare4 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52069681 | Utilizator | |
Fișier | numarare4.cpp | Dimensiune | 364 B |
Data încărcării | 18 Septembrie 2024, 10:27 | Scor / rezultat | Eroare de compilare |
numarare4.cpp:2:7: error: expected nested-name-specifier before 'namespac' using namespac std; ^ numarare4.cpp:2:7: error: 'namespac' has not been declared numarare4.cpp:2:16: error: expected ';' before 'std' using namespac std; ^ numarare4.cpp:2:16: error: 'std' does not name a type numarare4.cpp: In function 'int main()': numarare4.cpp:6:5: error: 'cin' was not declared in this scope cin>>n; ^ numarare4.cpp:6:5: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from numarare4.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ numarare4.cpp:14:13: error: 'j' was not declared in this scope for(j=2; j<min(v[i],v[n])/2; j++) ^ numarare4.cpp:14:33: error: 'min' was not declared in this scope for(j=2; j<min(v[i],v[n])/2; j++) ^ numarare4.cpp:14:33: note: suggested alternative: In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from numarare4.cpp:1: /usr/include/c++/4.8/bits/stl_algo.h:4226:5: note: 'std::min' min(initializer_list<_Tp> __l, _Compare __comp) ^ numarare4.cpp:20:5: error: 'cout' was not declared in this scope cout<<sum; ^ numarare4.cpp:20:5: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from numarare4.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numarare4 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ă.