| Problema | Numere Mari | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64284313 | Utilizator | |
| Fișier | numere_mari.cpp | Dimensiune | 7.01 KB |
| Data încărcării | 28 Aprilie 2026, 08:09 | Scor/rezultat | Eroare de compilare |
numere_mari.cpp: In member function ‘big_int::operator std::string() const’: numere_mari.cpp:56:13: warning: unused variable ‘i’ [-Wunused-variable] 56 | int i; | ^ numere_mari.cpp: In member function ‘big_int big_int::operator+(const big_int&) const’: numere_mari.cpp:127:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long unsigned int’ [-Wsign-compare] 127 | for(i=0;i<min(digits.size(),b.digits.size());i++) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ numere_mari.cpp:133:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 133 | for (; i < digits.size(); i++) | ~~^~~~~~~~~~~~~~~ numere_mari.cpp:139:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 139 | for (; i < b.digits.size(); i++) | ~~^~~~~~~~~~~~~~~~~ numere_mari.cpp: In member function ‘big_int big_int::operator-(const big_int&) const’: numere_mari.cpp:170:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long unsigned int’ [-Wsign-compare] 170 | for(i=0;i<min(digits.size(),b.digits.size());i++) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ numere_mari.cpp:184:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 184 | for (; i < digits.size(); i++) | ~~^~~~~~~~~~~~~~~ numere_mari.cpp: In member function ‘big_int big_int::operator*(const big_int&) const’: numere_mari.cpp:203:19: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive] 203 | big_int r="0"; | ^~~ | | | const char* numere_mari.cpp:34:17: note: initializing argument 1 of ‘big_int::big_int(int)’ 34 | big_int(int n) | ~~~~^ numere_mari.cpp:206:25: error: ‘a’ was not declared in this scope 206 | r.digits.resize(a.digits.size()+b.digits.size()); | ^ numere_mari.cpp:208:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 208 | for(i=0;i<digits.size();i++) | ~^~~~~~~~~~~~~~ numere_mari.cpp:210:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 210 | for(j=0;j<b.digits.size();j++) | ~^~~~~~~~~~~~~~~~ numere_mari.cpp:212:38: error: expected ‘]’ before ‘)’ token 212 | int suma=r.digits[i+j)(digits[i]-'0') | ^ numere_mari.cpp:212:38: error: expected ‘,’ or ‘;’ before ‘)’ token numere_mari.cpp:212:21: warning: unused variable ‘suma’ [-Wunused-variable] 212 | int suma=r.digits[i+j)(digits[i]-'0') | ^~~~ numere_mari.cpp:207:13: warning: unused variable ‘cnt’ [-Wunused-variable] 207 | int cnt,i,j; | ^~~ numere_mari.cpp: In member function ‘big_int big_int::operator/(const big_int&) const’: numere_mari.cpp:219:5: warning: no return statement in function returning non-void [-Wreturn-type] 219 | } | ^ numere_mari.cpp: In member function ‘big_int big_int::operator%(const big_int&) const’: numere_mari.cpp:223:5: warning: no return statement in function returning non-void [-Wreturn-type] 223 | } | ^ numere_mari.cpp: At global scope: numere_mari.cpp:270:5: error: redefinition of ‘int main()’ 270 | int main() | ^~~~ numere_mari.cpp:251:5: note: ‘int main()’ previously defined here 251 | int main() | ^~~~ numere_mari.cpp: In member function ‘big_int big_int::operator+(const big_int&) const’: numere_mari.cpp:152:5: warning: control reaches end of non-void function [-Wreturn-type] 152 | } | ^ numere_mari.cpp: In member function ‘big_int big_int::operator-(const big_int&) const’: numere_mari.cpp:197:5: warning: control reaches end of non-void function [-Wreturn-type] 197 | } | ^ numere_mari.cpp: In member function ‘big_int big_int::operator*(const big_int&) const’: numere_mari.cpp:215:5: warning: control reaches end of non-void function [-Wreturn-type] 215 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere Mari face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. 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ă.