#858
Expresie6
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 | #36160269 | Utilizator | |
Fișier | expresie6.cpp | Dimensiune | 1.06 KB |
Data încărcării | 07 Aprilie 2022, 11:38 | Scor / rezultat | 100 puncte |
expresie6.cpp: In function 'int main()': expresie6.cpp:11:5: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(s); ^ expresie6.cpp:11:11: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(s); ^ expresie6.cpp:14:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i<strlen(s); i++) ^ expresie6.cpp:20:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(s[i] == 'x' || s[i] == 'y' || s[i] == 'z') ^ expresie6.cpp:48:35: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=] printf("%d%c",max,'x'+imax); ^ expresie6.cpp:11:12: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result] gets(s); ^ /tmp/ccXNnRT5.o: In function \`main': expresie6.cpp:(.text.startup+0x15): warning: the \`gets' function is dangerous and should not be used.
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 0 secunde | OK. | 10 | 10 | ||
9 | 0 secunde | OK. | 10 | 10 | ||
10 | 0 secunde | OK. | 10 | 10 | ||
Punctaj total | 100 |
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ă.