#1443
Citind greutăţile unor cutii, să se determine numărul de control după o regulă precizată şi să se verifice dacă este număr prim.
Problema | control2 | Operații I/O |
![]() control2.in /control2.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #56921067 | Utilizator | |
Fișier | control2.cpp | Dimensiune | 2.20 KB |
Data încărcării | 10 Martie 2025, 22:07 | Scor / rezultat | Eroare de compilare |
control2.cpp: In function 'int main()': control2.cpp:28:8: error: expected ')' before '{' token { ^ control2.cpp:34:21: error: 'i' was not declared in this scope for (int i = 0; i < n; i++) { ^ control2.cpp:34:31: error: expected ';' before ')' token for (int i = 0; i < n; i++) { ^ control2.cpp:8:12: warning: unused variable 'N' [-Wunused-variable] int n, N[100], temp[100],veg[100], akt, aktsz = 0, p = 0, par = 0, q = 0, control=0; ^ control2.cpp:8:20: warning: unused variable 'temp' [-Wunused-variable] int n, N[100], temp[100],veg[100], akt, aktsz = 0, p = 0, par = 0, q = 0, control=0; ^ control2.cpp:8:30: warning: unused variable 'veg' [-Wunused-variable] int n, N[100], temp[100],veg[100], akt, aktsz = 0, p = 0, par = 0, q = 0, control=0; ^ control2.cpp:8:40: warning: unused variable 'akt' [-Wunused-variable] int n, N[100], temp[100],veg[100], akt, aktsz = 0, p = 0, par = 0, q = 0, control=0; ^ control2.cpp:8:45: warning: unused variable 'aktsz' [-Wunused-variable] int n, N[100], temp[100],veg[100], akt, aktsz = 0, p = 0, par = 0, q = 0, control=0; ^ control2.cpp:8:56: warning: unused variable 'p' [-Wunused-variable] int n, N[100], temp[100],veg[100], akt, aktsz = 0, p = 0, par = 0, q = 0, control=0; ^ control2.cpp:8:63: warning: unused variable 'par' [-Wunused-variable] int n, N[100], temp[100],veg[100], akt, aktsz = 0, p = 0, par = 0, q = 0, control=0; ^ control2.cpp:8:72: warning: unused variable 'q' [-Wunused-variable] int n, N[100], temp[100],veg[100], akt, aktsz = 0, p = 0, par = 0, q = 0, control=0; ^ control2.cpp:8:79: warning: unused variable 'control' [-Wunused-variable] int n, N[100], temp[100],veg[100], akt, aktsz = 0, p = 0, par = 0, q = 0, control=0; ^ control2.cpp:9:10: warning: unused variable 'ok' [-Wunused-variable] bool ok, prime; ^ control2.cpp:9:14: warning: unused variable 'prime' [-Wunused-variable] bool ok, prime; ^ control2.cpp:105:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema control2 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ă.