#4373
Bubu are 2 cutii cu bomboane, în prima cutie sunt a bomboane, iar în a doua cutie sunt b bomboane. Bunica i-a promis lui Bubu că de fiecare dată când primește un zece la informatică, va adăuga în prima cutie a bomboane, iar bunicul i-a promis că de fiecare dată când primește un zece la matematică va adăuga în a doua cutie b bomboane.
Determinați numărul minim de note de zece pe care trebuie să le primească Bubu pentru ca numărul de bomboanele din cele 2 cutii să devină egal.
| Problema | NotaZece | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64631567 | Utilizator | |
| Fișier | notazece.cpp | Dimensiune | 303 B |
| Data încărcării | 19 Mai 2026, 13:58 | Scor/rezultat | Eroare de compilare |
notazece.cpp:6:1: error: extended character is not valid in an identifier 6 | cin>>a>>b; | ^ notazece.cpp:6:1: error: extended character is not valid in an identifier notazece.cpp:7:1: error: extended character is not valid in an identifier 7 | x=a; | ^ notazece.cpp:7:1: error: extended character is not valid in an identifier notazece.cpp:8:1: error: extended character is not valid in an identifier 8 | y=b; | ^ notazece.cpp:8:1: error: extended character is not valid in an identifier notazece.cpp:9:1: error: extended character is not valid in an identifier 9 | while(y!=0){ | ^ notazece.cpp:9:1: error: extended character is not valid in an identifier notazece.cpp:10:1: error: extended character is not valid in an identifier 10 | r=x%y; | ^ notazece.cpp:10:1: error: extended character is not valid in an identifier notazece.cpp:10:1: error: extended character is not valid in an identifier notazece.cpp:10:1: error: extended character is not valid in an identifier notazece.cpp:10:1: error: extended character is not valid in an identifier notazece.cpp:11:1: error: extended character is not valid in an identifier 11 | x=y; | ^ notazece.cpp:11:1: error: extended character is not valid in an identifier notazece.cpp:11:1: error: extended character is not valid in an identifier notazece.cpp:11:1: error: extended character is not valid in an identifier notazece.cpp:11:1: error: extended character is not valid in an identifier notazece.cpp:12:1: error: extended character is not valid in an identifier 12 | y=r; | ^ notazece.cpp:12:1: error: extended character is not valid in an identifier notazece.cpp:12:1: error: extended character is not valid in an identifier notazece.cpp:12:1: error: extended character is not valid in an identifier notazece.cpp:12:1: error: extended character is not valid in an identifier notazece.cpp:13:1: error: extended character is not valid in an identifier 13 | } | ^ notazece.cpp:13:1: error: extended character is not valid in an identifier notazece.cpp:19:1: error: extended character is not valid in an identifier 19 | return 0; | ^ notazece.cpp:19:1: error: extended character is not valid in an identifier notazece.cpp:19:1: error: extended character is not valid in an identifier notazece.cpp: In function ‘int main()’: notazece.cpp:6:1: error: ‘ ’ was not declared in this scope 6 | cin>>a>>b; | ^~ notazece.cpp:7:3: error: expected ‘;’ before ‘x’ 7 | x=a; | ^~ | ; notazece.cpp:8:3: error: expected ‘;’ before ‘y’ 8 | y=b; | ^~ | ; notazece.cpp:9:3: error: expected ‘;’ before ‘while’ 9 | while(y!=0){ | ^~~~~~ | ; notazece.cpp:19:1: error: ‘ ’ was not declared in this scope 19 | return 0; | ^~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NotaZece 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ă.