#858
Se dă o expresie cu necunoscutele x y z și coeficienți întregi. Să se reducă termenii asemenea și să se determine termenul din expresia rezultat cu coeficientul maxim.
| Problema | Expresie6 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64123129 | Utilizator | |
| Fișier | expresie6.cpp | Dimensiune | 2.51 KB |
| Data încărcării | 18 Aprilie 2026, 17:09 | Scor/rezultat | 60 puncte |
expresie6.cpp: In function ‘int main()’: expresie6.cpp:54:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 54 | while (i < termen.length() && isdigit(termen[i])) { | ~~^~~~~~~~~~~~~~~~~ expresie6.cpp:66:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 66 | if (i < termen.length() && (termen[i] == 'x' || termen[i] == 'y' || termen[i] == 'z')) { | ~~^~~~~~~~~~~~~~~~~ expresie6.cpp:37:10: warning: unused variable ‘primul’ [-Wunused-variable] 37 | bool primul = true; | ^~~~~~ expresie6.cpp:38:15: warning: unused variable ‘val_curent’ [-Wunused-variable] 38 | long long val_curent = 0; | ^~~~~~~~~~ expresie6.cpp:39:10: warning: unused variable ‘var_curent’ [-Wunused-variable] 39 | char var_curent = 0; | ^~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| 6 | 0.001 secunde | OK. | 10 | 10 | ||
| 7 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| 10 | 0.002 secunde | OK. | 10 | 10 | ||
| Punctaj total | 60 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Expresie6 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ă.