#506
Se dă un şir cu n elemente, numere naturale. Să se verifice dacă în șir există elemente prime.
| Problema | ExistaPrime | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64630169 | Utilizator | |
| Fișier | existaprime.cpp | Dimensiune | 477 B |
| Data încărcării | 19 Mai 2026, 12:57 | Scor/rezultat | Eroare de compilare |
existaprime.cpp: In function ‘int main()’: existaprime.cpp:4:8: error: expected ‘(’ before ‘boul’ 4 | if boul prim(int x){ | ^~~~ | ( existaprime.cpp:13:14: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 13 | int main () { | ^~ existaprime.cpp:13:14: note: remove parentheses to default-initialize a variable 13 | int main () { | ^~ | -- existaprime.cpp:13:14: note: or replace parentheses with braces to value-initialize a variable existaprime.cpp:13:17: error: a function-definition is not allowed here before ‘{’ token 13 | int main () { | ^ existaprime.cpp:23:2: error: expected ‘}’ at end of input 23 | } | ^ existaprime.cpp:3:12: note: to match this ‘{’ 3 | int main() { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ExistaPrime 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ă.