#407
Se dă un șir cu n numere naturale. Determinați suma celor care au oglinditul număr prim.
| Problema | OglinditPrim | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64812377 | Utilizator | |
| Fișier | oglinditprim.cpp | Dimensiune | 626 B |
| Data încărcării | 02 Iunie 2026, 22:20 | Scor/rezultat | Eroare de compilare |
oglinditprim.cpp:4:1: error: expected unqualified-id before ‘long’ 4 | long long S; | ^~~~ oglinditprim.cpp: In function ‘int main()’: oglinditprim.cpp:9:9: error: ‘S’ was not declared in this scope 9 | S = 0; | ^ oglinditprim.cpp:22:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 22 | if (og < 2) prim = false; ș | ^~ oglinditprim.cpp:22:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 22 | if (og < 2) prim = false; ș | ^ oglinditprim.cpp:22:37: error: ‘ș’ was not declared in this scope oglinditprim.cpp:23:33: warning: statement has no effect [-Wunused-value] 23 | for (d = 2; d * d <= og && prim; d++) | ~~~~~~~~~~~~^~~~~~~ oglinditprim.cpp:23:45: error: expected ‘;’ before ‘)’ token 23 | for (d = 2; d * d <= og && prim; d++) | ^ | ;
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema OglinditPrim 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ă.