#379
Se citește un număr natural. Să se verifice dacă este aproape prim.
| Problema | aprim | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64598104 | Utilizator | |
| Fișier | aprim.cpp | Dimensiune | 938 B |
| Data încărcării | 17 Mai 2026, 22:13 | Scor/rezultat | Eroare de compilare |
aprim.cpp: In function ‘int main()’: aprim.cpp:18:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 18 | if(a % d == 0) | ^~ aprim.cpp:19:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 19 | prim = 0;u | ^ aprim.cpp:19:30: error: ‘u’ was not declared in this scope aprim.cpp:27:17: error: ‘ford’ was not declared in this scope 27 | ford = 2; d * d <= b; d++) | ^~~~ aprim.cpp:27:33: warning: statement has no effect [-Wunused-value] 27 | ford = 2; d * d <= b; d++) | ~~~~~~^~~~ aprim.cpp:27:42: error: expected ‘;’ before ‘)’ token 27 | ford = 2; d * d <= b; d++) | ^ | ; aprim.cpp:40:17: error: unable to find string literal operator ‘operator""l’ with ‘const char [3]’, ‘long unsigned int’ arguments 40 | cout << "NU"l | ^~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema aprim 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ă.